mirror of
https://gitea.ingwaz.work/Ingwaz/openbrain-mcp.git
synced 2026-03-31 14:49:06 +00:00
Fix Issue #12 tests and add OpenBrain repo guidance
This commit is contained in:
@@ -15,31 +15,50 @@ pub fn get_tool_definitions() -> Vec<Value> {
|
||||
vec![
|
||||
json!({
|
||||
"name": "store",
|
||||
"description": "Store a memory with automatic embedding generation",
|
||||
"description": "Store a memory with automatic embedding generation and keyword extraction. The memory will be associated with the agent_id for isolated retrieval.",
|
||||
"inputSchema": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"content": {"type": "string"},
|
||||
"agent_id": {"type": "string"},
|
||||
"metadata": {"type": "object"}
|
||||
"content": {
|
||||
"type": "string",
|
||||
"description": "The text content to store as a memory"
|
||||
},
|
||||
"agent_id": {
|
||||
"type": "string",
|
||||
"description": "Unique identifier for the agent storing the memory (default: 'default')"
|
||||
},
|
||||
"metadata": {
|
||||
"type": "object",
|
||||
"description": "Optional metadata to attach to the memory"
|
||||
}
|
||||
},
|
||||
"required": ["content"]
|
||||
}
|
||||
}),
|
||||
json!({
|
||||
"name": "batch_store",
|
||||
"description": "Store multiple memories in a single call (1-50 entries)",
|
||||
"description": "Store multiple memories with automatic embedding generation and keyword extraction. Accepts 1-50 entries and stores them atomically in a single transaction.",
|
||||
"inputSchema": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"agent_id": {"type": "string"},
|
||||
"agent_id": {
|
||||
"type": "string",
|
||||
"description": "Unique identifier for the agent storing the memories (default: 'default')"
|
||||
},
|
||||
"entries": {
|
||||
"type": "array",
|
||||
"description": "Array of 1-50 memory entries to store atomically",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"content": {"type": "string"},
|
||||
"metadata": {"type": "object"}
|
||||
"content": {
|
||||
"type": "string",
|
||||
"description": "The text content to store as a memory"
|
||||
},
|
||||
"metadata": {
|
||||
"type": "object",
|
||||
"description": "Optional metadata to attach to the memory"
|
||||
}
|
||||
},
|
||||
"required": ["content"]
|
||||
}
|
||||
@@ -50,27 +69,48 @@ pub fn get_tool_definitions() -> Vec<Value> {
|
||||
}),
|
||||
json!({
|
||||
"name": "query",
|
||||
"description": "Query memories by semantic similarity",
|
||||
"description": "Query stored memories using semantic similarity search. Returns the most relevant memories based on the query text.",
|
||||
"inputSchema": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"query": {"type": "string"},
|
||||
"agent_id": {"type": "string"},
|
||||
"limit": {"type": "integer"},
|
||||
"threshold": {"type": "number"}
|
||||
"query": {
|
||||
"type": "string",
|
||||
"description": "The search query text"
|
||||
},
|
||||
"agent_id": {
|
||||
"type": "string",
|
||||
"description": "Agent ID to search within (default: 'default')"
|
||||
},
|
||||
"limit": {
|
||||
"type": "integer",
|
||||
"description": "Maximum number of results to return (default: 10)"
|
||||
},
|
||||
"threshold": {
|
||||
"type": "number",
|
||||
"description": "Minimum similarity threshold 0.0-1.0 (default: 0.5)"
|
||||
}
|
||||
},
|
||||
"required": ["query"]
|
||||
}
|
||||
}),
|
||||
json!({
|
||||
"name": "purge",
|
||||
"description": "Delete memories by agent_id",
|
||||
"description": "Delete memories for an agent. Can delete all memories or those before a specific timestamp.",
|
||||
"inputSchema": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"agent_id": {"type": "string"},
|
||||
"before": {"type": "string"},
|
||||
"confirm": {"type": "boolean"}
|
||||
"agent_id": {
|
||||
"type": "string",
|
||||
"description": "Agent ID whose memories to delete (required)"
|
||||
},
|
||||
"before": {
|
||||
"type": "string",
|
||||
"description": "Optional ISO8601 timestamp - delete memories created before this time"
|
||||
},
|
||||
"confirm": {
|
||||
"type": "boolean",
|
||||
"description": "Must be true to confirm deletion"
|
||||
}
|
||||
},
|
||||
"required": ["agent_id", "confirm"]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user