A FastAPI-based Model Context Protocol (MCP) server with support for tools, resources, RAG (Retrieval-Augmented Generation) via R2R, conversation management, multiple AI providers, and hybrid search capabilities using Elasticsearch and vector databases.
This server exhibits critical gaps in tool definition quality across all four tools. None of the tool definitions are explicitly visible in source code with full schemas, they are inferred from app/core/mcp_handlers.py imports but the actual handler implementations are not provided. Descriptions are present but generic and lack LLM-optimization. Parameter schemas are partially visible in the prompt but lack formal JSON Schema constraints (no enums, no min/max bounds, no strict type validation). Error handling is absent, no recovery guidance in descriptions. Output schemas are completely undocumented. Security concerns are severe: the api_request tool accepts arbitrary headers and method/URL parameters, creating injection vectors. The write_file tool has no path traversal protection documented. Overall, this reads like an early-stage proof-of-concept rather than production-ready tooling.
Make an HTTP request
Read content from a file
Search for content in files
Write content to a file
api_request tool is dangerously overloaded and unconstrained. Accepts arbitrary HTTP method, URL, and headers with no validation, enabling Server-Side Request Forgery (SSRF), header injection, and credential leakage. Violates secret-injection and tool-gateway patterns.
write_file and read_file lack path safety validation. No mention of path traversal protection (../ attacks). LLMs can be prompted to read /etc/passwd or write to system directories if no validation guards these operations.
All tool descriptions fall below LLM-optimization baselines. Tool descriptions average 23 chars (rubric baseline 194 chars, p10=34). They lack WHEN/WHY context, consequences (idempotent?), and recovery guidance. LLMs cannot effectively reason about tool selection with such sparse descriptions.
Inferred effective spec: <=2025-11-25.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-22 | F | 43 | <=2025-11-25 | v2 |
| 2026-03-09 | F | 32 | - | v1 |
No input parameters have enums or constraints. 'method' in api_request is a free-form string (should be enum: GET|POST|PUT|DELETE|PATCH). 'path' in read_file/write_file has no safe-path validation. 'pattern' in search_content has no regex format declaration. LLMs will hallucinate invalid values.
Zero error handling guidance. No descriptions explain how LLM should respond to failures (file not found, regex error, timeout, permission denied). Error responses in code are bare exceptions. Violates recovery-guide pattern.
Output schemas completely undocumented for all four tools. What does search_content return? A list of file paths? Match objects? Line numbers? Context snippets? LLMs cannot plan downstream operations without knowing the response structure.
Tool definitions are inferred from imports in mcp_handlers.py but the actual handler implementations are not provided in source. Cannot verify schemas, error handling, or input validation are actually implemented as described.
write_file and api_request are destructive/have side effects but lack confirmation or dry-run support. Agents making mistakes will silently corrupt files or make unauthorized API calls. No compensation tools provided.
api_request tool has no documented rate limits, timeouts, or scope declarations. Could allow runaway agents to DDoS external APIs. No permission gating (write vs read APIs).
Parameter naming inconsistencies: 'path' used for both file read and search, but search_content might interpret it differently (directory vs file). Should clarify: 'file_path', 'directory_path', 'search_root'.