FastMCP server for code analysis with Neo4j graph database and Qdrant vector search. Provides tools for analyzing code structure, dependencies, quality metrics, and semantic code search with task-based data isolation.
Strong foundation with 10 well-named tools following verb_noun convention (execute_, semantic_, analyze_, find_, trace_, get_, search_). All tools have descriptions (avg ~250 chars, within 194-char baseline). Input schemas present with type definitions. However, output schemas are undocumented, no return type specifications visible in tool definitions. Error handling is minimal; most tools lack recovery guidance. Parameter descriptions are present but some lack constraints (e.g., top_k has no bounds, limit defaults to 20 but max is 50 with no enforcement visible). Security is strong (read-only operations, task_id isolation via headers), but descriptions could better explain when to use each tool vs. alternatives.
Analyze a specific class in detail. Provides comprehensive information about: - Class metadata (name, file, location) - Methods and their signatures - Inheritance hierarchy - Dependencies (imports, uses, instantiations) — first 10 shown - Documentation status (docstring truncated at 500 chars) Both task_id and repo_namespace are automatically extracted from HTTP headers.
Analyze code quality metrics and patterns. Analysis types: - 'overview': General quality metrics and statistics - 'complexity': Functions/classes with high complexity - 'documentation': Documentation coverage analysis - 'hotspots': Most called/used code (potential areas of risk) Both task_id and repo_namespace are automatically extracted from HTTP headers.
Analyze a specific function in detail. Provides comprehensive information about: - Function metadata (name, file, location) - Parameters and type annotations - Return type - What it calls — first 10 shown - What it instantiates — first 10 shown - Where it's called from — first 10 shown - Exceptions raised - Documentation (docstring truncated at 500 chars) - Complexity indicators Both task_id and repo_namespace are automatically extracted from HTTP headers.
Execute a raw Cypher query against the code graph database. IMPORTANT: Only use this tool as a LAST RESORT when no other tool can answer the question. Prefer these dedicated tools first: - get_source_code: To fetch source code for an entity - search_entities: To find entities by name, type, or file - trace_call_chain: To trace function call relationships - get_file_structure: To list entities in a file or list all files - analyze_class / analyze_function: For detailed entity analysis - find_dependencies: For dependency analysis - semantic_code_search: For natural language code search RESTRICTIONS: - Queries referencing CONTENT nodes, HAS_CONTENT, or code_snippet are BLOCKED. Use get_source_code to fetch source code instead. - CONTENT nodes are also stripped from results (catches generic queries like MATCH (n) RETURN n). - A LIMIT 200 is automatically appended if your query does not include one. - String fields longer than 2000 characters are truncated in results. Both task_id and repo_namespace are automatically extracted from HTTP headers. Include $task_id in your Cypher queries.
Output schemas undocumented. No return type specifications visible for any tool. LLMs cannot plan downstream calls or extract required fields (e.g., does analyze_class return method_count? Does get_source_code return line_numbers?).
Parameter constraints missing or incomplete. semantic_code_search.top_k has no min/max bounds (baseline: 1 - 100). search_entities.limit defaults to 20 but max is 50, no enforcement visible in schema. Unbounded numeric params invite LLM hallucination.
Error handling lacks recovery guidance. No visible error responses that tell LLM what to do next (e.g., 'task_id required' error exists, but no guidance on how to obtain it). Errors should categorize as retryable/user-fixable/fatal.
Inferred effective spec: <=2025-11-25.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-23 | C | 62 | <=2025-11-25 | v2 |
Find dependencies for an entity or analyze repository-wide dependencies. Dependency types: - 'imports': External libraries and modules imported - 'calls': Functions/methods called - 'instantiates': Classes instantiated (constructor calls) - 'uses': Variables and attributes used - 'inherits': Base classes inherited from - 'all': All dependency types If no entity_qualified_name is provided, analyzes all dependencies in the task's dataset. Both task_id and repo_namespace are automatically extracted from HTTP headers.
Get the structure of a file or list all files in the repository. Without file_path: Lists all files in the task's dataset (max 100). With file_path: Lists all entities (classes, functions, etc.) in that file. Both task_id and repo_namespace are automatically extracted from HTTP headers.
Fetch the full source code for a code entity. Use this tool whenever you need to retrieve the actual implementation/source code of a class, function, method, or any other code entity. This is the PREFERRED and ONLY way to get source code — execute_cypher_query blocks CONTENT node access. The tool automatically handles the graph traversal to get complete source code from CONTENT nodes. Returns up to 5 matching entities. Source code is truncated at 10,000 chars per entity. Does not return FILE, MODULE, or REPOSITORY nodes — use get_file_structure for those.
Search for code entities by name, type, or file path. Use this tool to find entities in the codebase without writing Cypher queries. At least one filter must be provided. Results include metadata but not source code — use get_source_code to fetch the actual code for entities you find.
Search for code semantically similar to the query using vector embeddings. Use this tool to find code by meaning, not just keywords: - "user authentication logic" - "error handling patterns" - "database connection setup" - "API endpoint definitions" Returns the most relevant code entities with similarity scores. Both task_id and repo_namespace are automatically extracted from HTTP headers.
Trace function/method call relationships in the codebase. Direction: - 'outgoing': What does this function call? (downstream) - 'incoming': What calls this function? (upstream) - 'both': Both directions Depth controls how many levels to traverse (default: 1). Both task_id and repo_namespace are automatically extracted from HTTP headers.
Tool descriptions lack differentiation guidance. execute_cypher_query description says 'prefer dedicated tools' but does not explain when raw Cypher is necessary vs. semantic_code_search or trace_call_chain. LLMs waste reasoning cycles deciding between similar tools.
Pagination not visible in schema. get_file_structure returns 'max 100' files but no offset/limit params shown. search_entities has limit but no offset/cursor. Large result sets risk context window exhaustion.