MCP server examples demonstrating tools, resources, prompts, and logging capabilities in both Python and TypeScript
This server has significant issues with tool definition quality. It declares 11 tools but appears to have 5 unique tools (calculate, fetch-json, creative_response, read_file, write_file, echo) with duplicates across Python and TypeScript implementations. Tool descriptions are present but often generic and under-optimized for LLM selection. Input schemas are visible in code but parameter descriptions vary widely in quality. Error handling is present in some tools (e.g., fetch_json) but missing context for agent recovery. The server lacks tool annotations (destructiveHint, readOnlyHint, idempotentHint) entirely. Output schemas are not documented. Overall structure suggests educational material rather than production-grade agent tooling.
Performs a simple calculation (add, subtract, multiply, divide).
Performs a simple calculation (+, -, *, /).
Generates a creative text response based on prompt and temperature setting.
Generates a creative response based on a prompt, influenced by temperature.
Simply returns the message provided.
Fetches JSON data from a provided URL.
Fetches JSON data from a given URL.
Reads the content of a specified file within the server's sandbox directory.
Duplicate tool definitions across Python and TypeScript implementations. 5 unique tools are registered twice (or near-duplicate), creating ambiguity and wasting context window. Tools: calculate, fetch-json, creative_response, read_file, write_file.
Missing tool annotations entirely. No tools declare destructiveHint, readOnlyHint, or idempotentHint. This is required for agent safety and planning. write_file and read_file must declare their intent.
fetch-json (variant 2) has a broken input schema. The 'url' parameter description reads 'Invalid URL provided.' which is an error message, not a parameter description. LLMs cannot infer what this parameter does.
Inferred effective spec: <=2025-11-25.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-22 | F | 49 | <=2025-11-25 | v2 |
| 2026-03-09 | F | 46 | - | v1 |
Reads the content of a specified file within the server's sandbox directory.
Writes text content to a specified file within the server's sandbox directory.
Writes text content to a specified file within the server's sandbox directory.
No output schemas documented. Tools return strings (e.g., calculate returns str, fetch_json returns JSON string, read_file returns file content string) but the response structure is not formally declared. LLMs cannot plan downstream tool chains without knowing what fields to expect.
Tool descriptions are generic and do not guide LLM selection. 'Performs a simple calculation' and 'Fetches JSON data' lack context about when to use each tool vs alternatives, prerequisites, or limitations (e.g., fetch-json requires HTTPS, supports timeouts).
Error handling lacks recovery guidance. fetch_json raises ClientResponseError, ClientConnectionError, and TimeoutError but does not tell the LLM what to do next. Should return actionable guidance like 'URL unreachable. Try with http:// or check domain spelling.'
calculate tool uses unbounded numeric parameters (a, b). No min/max constraints defined. LLMs may pass extremely large numbers causing overflow or timeout.
read_file and write_file accept unbounded 'filename' parameter with no path traversal protection documented. LLM could be tricked into 'filename': '../../../etc/passwd'. Input validation must be explicit and error messages actionable.
creative_response uses a hardcoded set of responses and does not actually interact with an LLM. Temperature parameter is accepted but the tool's behavior does not meaningfully vary with temperature, it just picks from a static list. This misleads the agent about the tool's capability.
echo tool has minimal description and appears to be a test/demo tool. It does not belong in a production server and should be removed or clearly marked as example-only.