MCP server for memory management with MemoryBank integration, supporting multiple vector stores (Qdrant, PostgreSQL, MongoDB) and session-based memory retrieval
This server has 4 tools with critical definition quality issues. Only 2 of 4 tools have input schemas visible in the code. Descriptions are extremely sparse (ping: 23 chars, embed: 80 chars, initialize: 56 chars, prompt_with_memories: 77 chars). The embed and prompt_with_memories tools have parameter schemas, but naming is inconsistent and descriptions lack LLM-optimization guidance. The initialize tool mixes state mutation concerns. The overall structure suggests tool registrations exist but lack the production-grade documentation required for confident agent use. The codebase snippet is truncated, preventing full schema validation.
Tools (4)
embedread onlysource verified50/100
Return embedding vector for a text using AutoEmbedder (ADK_EMBED_* env)
Output schemas are not documented for any tool. LLMs cannot predict response structure, shape, or which fields are available for downstream chaining. This forces agents to reason about unknown data shapes and risk field-mapping errors.
Tool descriptions are uniformly short (23 - 80 chars) and lack LLM-optimization guidance. None state WHEN to call the tool, what the intended user intent is, or dependencies on other tools. Baseline average is 194 chars; these are 40 - 60% shorter.
The 'initialize' tool mutates state (saves session to disk) but the description does not explicitly state 'This is a WRITE operation' or explain persistence semantics. Agents cannot determine retry safety or consequences.
initialize
Recommendations
Document output schemas for all tools. For 'health.ping', specify: { "type": "object", "properties": { "status": { "type": "string", "enum": ["pong"] }, "timestamp": { "type": "string", "format": "date-time" } } }. For 'embed', return: { "type": "object", "properties": { "vector": { "type": "array", "items": { "type": "number" }, "description": "Embedding vector (768-dim or configurable)" }, "model": { "type": "string", "description": "Model name used for embedding" } } }.
Expand tool descriptions to 100 - 200 chars with LLM-optimization guidance. Example for 'embed': 'Convert text into a numerical vector using the configured embedding model (env ADK_EMBED_MODEL). Use this to find similar memories or compute semantic relevance. Returns a vector array and model name. Fails if no embedding service is configured.'
Explicitly mark state-mutating tools. Update 'initialize' description to: 'Create a new session ID and persist it to disk. This is a WRITE operation. Idempotent: calling twice with no session stored returns the same ID. Returns session_id and creation_timestamp.'
Document tool composition and chaining. Add to 'initialize' description: 'Returns session_id; pass this to prompt_with_memories(..., session_id=<returned_id>) to retrieve memories for that session.' Add to 'prompt_with_memories' description: 'Requires a valid session_id from initialize(). If omitted, uses stored session.'
Add error guidance for 'embed': 'If embedding fails: check env var ADK_EMBED_MODEL is set; verify embedding service is running (Ollama/Hugging Face). Returns error code 'unsupported_model' if the model is not available, 'service_unavailable' if unreachable.'
The 'initialize' tool has no input parameters but no output schema documentation. What does it return? A session_id string? A JSON object with session metadata? This ambiguity invites misuse.
Parameter naming lacks consistency with downstream tool expectations. The 'prompt_with_memories' tool accepts 'session_id' (optional), but 'initialize' returns unknown output. There is no chaining documentation showing how the initialize result maps to prompt_with_memories input.
No error handling guidance. None of the tools document what errors can occur, whether they are retryable, or what the LLM should do next (e.g., 'If embedding fails, check that the ADK_EMBED_* env vars are set').
The 'embed' tool documents env vars (ADK_EMBED_*) in its description, violating the pattern of server-side secret injection. Env vars are not parameters, but referencing them in the tool description suggests agent awareness of configuration, which is incorrect.
The 'health.ping' tool serves the same purpose as MCP protocol-level heartbeats and adds no functional value to the agent. Its inclusion suggests incomplete tool design review.
health.ping
Add error guidance for 'prompt_with_memories': 'If session_id is invalid, returns error 'session_not_found' with suggestions for valid session IDs. If no memories match, returns empty augmentation gracefully.'
Rename 'health.ping' to either remove it entirely (MCP protocol already has heartbeats) or rename to 'check_health_status' with description: 'Verify the server is running and responsive. Use this as a diagnostic before making other calls.' This adds intentional value.
Add permission scope annotations to all tools in descriptions. Example for 'initialize': '[Scope: write:session] Creates a new session...'. Example for 'prompt_with_memories': '[Scope: read:memory] Retrieves memories...'
Clarify the 'session_id' parameter in 'prompt_with_memories'. Add to description: 'Optional. If omitted, uses the session ID from the last initialize() call stored on this server. If provided, uses that session instead. Useful for multi-session agents.'
Add examples of parameter values in parameter descriptions (not in tool descriptions). For 'limit' in prompt_with_memories: 'Number of relevant memories (integer, 1 - 100, default 5). Higher limits return more context but increase token cost.'
Document pagination or limits for 'prompt_with_memories'. If it returns a list of augmentations, add: 'Capped at limit parameter. If more memories exist, the augmented prompt will include a note like "...and {N} more memories available." Call with higher limit to see more.'
Add retry and idempotency guidance. Example: 'health.ping is idempotent and safe to retry. embed is read-only but may fail transiently if the embedding service is slow; retry with exponential backoff. initialize is idempotent (same input = same output). prompt_with_memories is read-only.'
Remove reference to 'ADK_EMBED_* env' from the embed tool description or move to server documentation. The agent should not be aware of environment variable names, that's an implementation detail. Instead describe the behavior: 'Uses the configured embedding model (configured server-side).'