A code memory assistant that indexes code entities using tree-sitter, stores them in ChromaDB, and answers developer questions about codebases via semantic search with optional cloud synthesis (DeepSeek or local Ollama)
Universal Brain MCP has 7 well-named tools with clear purposes, but significant gaps in parameter documentation and output schema definitions limit overall quality. Tool names follow verb_noun pattern (scan_workspace, query_memory, brief_workspace, list_workspaces, drop_workspace_memory, get_workspace_brief, token_usage_report) and are action-oriented. Descriptions are comprehensive (150-350 chars) and explain purpose, behavior, and state changes. However, input schemas lack type definitions for parameters, and output schemas are entirely absent from the provided code. Security concerns exist around destructive operations without explicit confirmation patterns. Error handling and recovery guidance are not documented.
Generate a deep, structured markdown brief of a workspace covering 9 locked sections: Purpose, Tech Stack, Architecture, Key Flows, Data Models, Configuration, Deployment, Testing, and Notable Patterns. Background synthesis task (returns immediately, synthesis happens asynchronously). Stores the brief in .brain/contexts/<workspace_id>.md for later retrieval and context-building. Supports both local Ollama and cloud DeepSeek synthesis via SYNTHESIZE_WITH_CLOUD config.
Permanently delete all memory for a workspace: ChromaDB vector collection, context markdown file, and workspace registry entry in zerikai.db. Irreversible 3-step teardown. Accepts workspace UUID or display name. No undo.
Retrieve the cached markdown brief for a workspace (generated by brief_workspace). Returns the brief file contents or null if not yet generated. Read-only, no side effects.
List all indexed workspaces with their UUIDs, display names, creation timestamps, last scan times, and last brief update times. Queries the workspace_registry table in zerikai.db. Read-only, no side effects.
Search a workspace's indexed code memory for answers to developer questions. Performs semantic search on ChromaDB vectors, applies optional lexical re-ranking, and synthesizes a natural-language answer using either local Ollama (default) or cloud DeepSeek API based on routing heuristics (word count, keywords, memory mode). Returns a markdown-formatted answer with inline citations (#file:line format).
Input parameter schemas lack type definitions and constraints. Parameters show 'type' in descriptions (e.g., 'workspace_path: string', 'use_cloud: boolean|null') but these are not formally declared in JSON Schema format. No enum constraints, no min/max for numeric values, no regex patterns for strings.
Output schemas are completely undocumented. No tool declares what fields are returned, their types, or structure. Descriptions mention 'returns workspace ID and entity count' for scan_workspace and 'markdown-formatted answer with citations' for query_memory, but formal schema definitions are absent. This forces LLMs to reason blindly about downstream tool usage.
Inferred effective spec: <=2025-11-25.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-23 | D | 53 | <=2025-11-25 | v2 |
Scan a workspace directory and index all code entities (functions, classes, methods) into ChromaDB. Tree-sitter deterministically extracts entities from supported file types (Python, JavaScript, TypeScript, HTML, CSS, Markdown) with zero LLM calls. Stores metadata including file path, line numbers, docstrings, and signatures. Creates or reuses a workspace-specific ChromaDB collection. Returns workspace ID and entity count.
Generate a token usage and cost report for a workspace (if ENABLE_TOKEN_TRACKING is true). Queries zerikai.db for all operations, aggregates by model and operation type, calculates total USD cost, and returns a summary. Read-only, no side effects.
drop_workspace_memory is destructive and irreversible ('No undo') but has no confirmation/dry-run mechanism. An agent could accidentally delete critical workspace memory. No error categorization or recovery guidance provided.
query_memory accepts a 'use_cloud' parameter with type 'boolean|null' but does not explain the routing heuristics or constraints. LLMs cannot predict when cloud vs. local execution happens. No guidance on when to use each, cost implications, or latency differences.
brief_workspace description mentions 'background synthesis task (returns immediately)' but does not document what the return value contains, how to know when synthesis is complete, or how to retrieve the brief. Agents cannot tell if the tool succeeded or failed.
token_usage_report accepts optional date parameters (start_date, end_date) as 'string|null' but does not validate format (ISO 8601 expected per description). No error message defined for invalid dates. LLMs will pass malformed dates without guidance on correction.
scan_workspace and brief_workspace both operate on workspace_id/workspace_path but do not explain the relationship. scan_workspace takes 'workspace_path' and returns 'workspace_id', but brief_workspace also accepts 'workspace_id', unclear if the same ID can be reused or if they are separate namespaces.
No pagination guidance for list_workspaces. Description does not mention if results are capped, sorted, or if pagination is supported. An agent managing thousands of workspaces could hit context window limits or miss results.