MCP server for context management with markdown storage, CRUD operations, and search
The server provides 5 well-named CRUD and query tools for context management. Tool names follow verb_noun conventions (put_, get_, delete_, search_, list_). Descriptions are present and moderately detailed (ranging 95 - 250 chars). However, schemas have critical gaps: parameter types are inconsistent (e.g., get_context and delete_context accept 'name' as 'string or array' without proper type union in JSON Schema), and output schemas are not explicitly documented anywhere in the source. Error handling guidance is minimal, tools do not provide recovery suggestions. No destructive operation (delete_context, put_context with overwrite) includes confirmation mechanisms or dry-run support. The server architecture uses FastMCP with proper dependency injection via middleware, and pyproject.toml shows good build/lint/test discipline, but the tool definitions themselves lack the rigor expected of production-grade agents.
Delete context by name (forced eviction by agent). Supports both single and bulk operations. Single: provide 'name' (str). Bulk: provide 'names' (list[str]) or 'name' as list[str]. For bulk operations, returns list of results with errors for missing contexts.
Get context by name. Supports both single and bulk operations. Single: provide 'name' (str). Bulk: provide 'names' (list[str]) or 'name' as list[str]. Returns context with 'text' (markdown body) and 'metadata' (from frontmatter). For bulk operations, returns list of results with errors for missing contexts.
List all contexts, sorted by creation date (newest first). Returns list of contexts with 'name', 'created_at', and 'preview' (first 100 chars). Optional 'limit' parameter to limit number of results.
Add or update context by name. Supports both single and bulk operations. Single: provide 'name' (str), 'text' (str, markdown content), and optional 'metadata' (dict). Bulk: provide 'contexts' (list[dict]) where each dict has 'name', 'text', optional 'metadata'. Names must be filename-safe (alphanumeric, hyphens, underscores). Overwrites existing contexts with a warning. Contexts are stored as .mdc files (markdown with YAML frontmatter).
Search for contexts matching a query string. Searches in both metadata and markdown body. Optional limit parameter to limit number of results.
Parameter type ambiguity in get_context and delete_context: 'name' parameter declared as 'string or array' without proper JSON Schema union type (oneOf). LLMs cannot reliably infer when to pass string vs array and will default to string, failing bulk operations.
No documented output schemas. Tools return results but the response structure is not declared in tool definitions. LLMs cannot plan downstream tool calls or extract required fields (e.g., 'metadata', 'text', 'created_at'). Response structure must be documented in tool definitions or implementation.
Destructive operations (delete_context, put_context with overwrite) lack confirmation or dry-run support. An agent can permanently delete contexts without a confirmation step. No recovery tools exist to undo deletions.
Inferred effective spec: <=2025-11-25.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-22 | D | 50 | <=2025-11-25 | v2 |
| 2026-03-09 | F | 46 | - | v1 |
Error messages and recovery guidance not visible in source. If a context is not found, the tool should suggest alternatives ('Did you mean: context_xyz, context_abc?') to guide the LLM. Current implementation appears to silently fail or return generic errors.
Bulk operation parameter design inconsistent. put_context uses 'contexts' (array) for bulk; get_context and delete_context accept 'name' (string or array). This forces LLMs to learn three different patterns for the same operation type (single vs bulk).
No tool annotations (readOnlyHint, destructiveHint) in schema. search_context, list_context, get_context should be marked readOnly; delete_context and put_context should be marked destructive. Without these hints, LLMs cannot reason about operation safety and may make poor plan choices.