Skip to main content
Glama

local_translate

Read-only

Translate text or file content with a local model, reading files server-side so large documents never consume your context. Splits long files at natural boundaries.

Instructions

PREFER this tool over reading the file with Read when the file is large (>200 lines / >10 KB) and you only need the translation, not the literal content.

Translates text or the content of a file with a local model, without spending Claude's context.

Pass 'path' to read the file server-side (the original does not enter Claude's context) or
'text'. Keeps the format of the original and returns ONLY the translation. Routes
automatically to the mechanical model (short) or the long-context model (long).

Long documents are split at natural boundaries (Markdown headers, paragraphs) and each chunk
is translated in its own call; the result comes back complete and in order, without the
truncated-output warning.

Args:
    target_lang: Target language (e.g. 'Spanish', 'English', 'French').
    text: Text to translate (use this or 'path').
    path: Path to a file whose content is translated (read server-side).

Input Schema

NameRequiredDescriptionDefault
pathNo
textNo
target_langYes

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.0

TDQS

A4.8/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare readOnlyHint=true and openWorldHint=false, but the description adds substantial context beyond them: server-side file reading that keeps content out of Claude's context, format preservation, model auto-routing by length, and chunking at Markdown/paragraph boundaries that avoids truncated-output warnings. This is exactly the behavioral detail an agent needs to trust the result.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded with the 'PREFER...' routing rule, which is the highest-value information. However, the no-context-cost benefit is stated twice ('without spending Claude's context' and 'does not enter Claude's context'), and the Args block largely restates the prose.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Even though an output schema exists, the description usefully explains the return contract (only the translation, complete and in order) and covers routing, chunking, and context isolation. For this complexity level nothing an agent needs to call it correctly is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description carries the burden, and it does explain all three parameters including that 'path' is read server-side and 'text' is the inline alternative. It stops short of stating what happens if both or neither are supplied, and gives no format notes for target_lang, so a small gap remains.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb+resource ('Translates text or the content of a file with a local model') and immediately scopes it as local/no-context-cost, which separates it from siblings like local_summarize and local_classify. The agent can identify the tool from the first sentence without opening the schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly routes usage: PREFER over Read when the file is large (>200 lines / >10 KB) and only the translation is needed, not literal content. It names the alternative tool (Read) and the condition that selects this one, and clarifies the 'path' vs 'text' choice.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.