A production-ready TypeScript MCP server implementation with example tools
Three tools with visible schemas and descriptions, but significant gaps in parameter documentation, error recovery guidance, and compositional clarity. Naming is action-based (calculator, weather, file_operations), which is correct, but parameter descriptions are minimal. The calculator and weather tools are read-only and simple, while file_operations is destructive but lacks confirmation or dry-run patterns. None of the tools include output schema documentation or pagination support. Error handling exists at the server level (McpError wrapping) but does not provide recovery guidance to LLMs. Average tool description length is ~110 chars (below the 194 baseline), and parameter descriptions are sparse or missing context about constraints and formats.
Performs mathematical operations including add, subtract, multiply, divide, power, and square root
Performs safe file system operations including read, write, list, delete, and exists checks
Retrieves current weather information and forecast for a specified location
file_operations tool lacks destructive operation safeguards. No confirmation step, dry-run option, or explicit warning about irreversible actions (delete). Agents may accidentally delete files without recovery options.
Parameter descriptions are minimal or missing format/constraint details. 'location' in weather tool lacks examples of valid formats. 'path' in file_operations does not specify whether it is absolute or relative, or whether it accepts directories. 'operation' enum is documented but operation-specific dependencies (e.g., 'content' is required only for write) are not clearly stated.
Output schemas are not documented. Callers cannot infer what fields are returned. For example, weather tool returns JSON but structure (temperature, forecast format, units) is not declared. This forces LLMs to guess or make invalid downstream tool calls.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-23 | D | 51 | 2026-07-28+ | v2 |
Error messages lack recovery guidance. Server converts all errors to McpError with generic text but does not suggest next steps. E.g., 'Weather error: ...' gives no hint whether to retry, check the location name, or consult documentation.
Tool descriptions are below the 50-char minimum for LLM clarity in some cases. 'Performs mathematical operations...' is adequate, but 'Performs safe file system operations...' is vague, what safety checks exist? Are there path restrictions?
No pagination or result-limiting patterns. file_operations 'list' operation does not specify a limit or return a next_cursor. If a directory has thousands of files, the entire list is returned, potentially exhausting the LLM context window.
Parameter 'b' in calculator tool is marked as not required, but the description does not explain when it is optional. The enum shows sqrt only, implying 'b' is optional only for sqrt, this dependency is not documented.
file_operations 'content' parameter is required only for the 'write' operation but the schema does not mark it as conditionally required. The description states this verbally, but JSON Schema does not enforce it, leaving LLMs to guess or cause validation errors.
weather tool 'units' parameter has a default value (celsius) but the description does not state what happens if an unsupported unit is passed (e.g., kelvin). Error behavior is undefined.