MCP server for translating text from a source language to a target language using Ollama AI models
The 'translate' tool has a basic structure with name, description, and input parameters, but significant gaps in schema documentation and parameter descriptions. The tool definition in cmd/translate-mcp/main.go uses mcp.AddTool() with nil InputSchema and OutputSchema, relying on inference. Input parameters (source, target, text) each have descriptions, but they are generic and lack format constraints (e.g., no enum of valid language codes, no examples of accepted formats). The description itself is minimal (61 chars) and does not explain when to use the tool vs alternatives, what it returns structurally, or error conditions. No output schema is visible in the code. The tool appears to accept free-form language names/codes without validation guidance, inviting hallucinated language codes from LLMs.
Translate text from a source language to a target language.
Input schemas are inferred rather than explicitly defined; InputSchema and OutputSchema both set to nil in mcp.AddTool(). This violates pattern:tool and makes the actual schema invisible in source code.
Tool description is 61 characters, below the 10-1024 character ideal range and lacks actionable detail. Missing: WHEN to use the tool, WHAT it returns structurally, prerequisites or dependencies, and error guidance.
Parameters 'source' and 'target' accept free-form language names or codes (e.g., 'en', 'English', 'ja', 'Japanese') but lack enum constraints or validation guidance. LLMs may pass invalid codes like 'england' or 'spanish' without constraint feedback.
No output schema or return type documentation visible. Agents do not know what fields or structure the 'translate' tool returns, preventing downstream tool composition and forcing LLMs to infer the response shape.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-22 | F | 47 | 2026-07-28+ | v2 |
| 2026-03-09 | F | 47 | - | v1 |
No error handling guidance in tool description. LLMs do not know what happens if an unsupported language pair is requested, if the Ollama service is unavailable, or if text is too long. Missing recovery hints.
Parameter descriptions lack format/constraint details. 'Source language code or name (e.g., 'en', 'English')' includes example values, which LLMs tend to reuse literally, rather than using formal enums or pattern constraints.