Skip to main content
Glama

translate_markdown

Translate Markdown documents while preserving code blocks, HTML, URLs, badges, and table formatting; only headings, paragraphs, taglines, and table cells are translated.

Instructions

Translate a markdown document while preserving its structure. Code blocks, HTML elements, URLs, badges, and table formatting are kept intact. Only prose content (headings, paragraphs, taglines, table cells) is translated. Supports segment-level caching.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "markdown": "<markdown>",
      "from": "<from>",
      "to": "<to>"
    },
    "name": "translate_markdown"
  }
}

Input Schema

NameRequiredDescriptionDefault
toYesTarget language code or name (e.g., "ja", "Japanese")
fromYesSource language code or name (e.g., "en", "English")
modelNoOllama model (default: "translategemma:27b")
markdownYesThe full markdown content to translate
onLostSpanNoWhat to do when a protected span (inline code, a protected term such as XLS-30 or Kimi-K3, or an "N of M" count) is missing from a translation: "report" (default) lists it with the result, "fail" makes it an error.
onUntranslatedNoWhat to do when prose (a sentence of 6 or more words) comes back identical to the English after its one retry: "report" (default) lists it with the result, "fail" makes it an error.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.11.0

TDQS

B3.4/5.0
Behavior3/5

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

With no annotations, the description carries the full burden, and it does disclose meaningful behavior: protected spans (code blocks, HTML, URLs, badges, tables) survive and only prose is translated, plus segment-level caching. It omits the LLM/Ollama dependency, latency and cost implications, determinism, and what the result looks like when spans or prose are reported.

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?

Four short sentences, front-loaded with the core action and followed by the preservation guarantee. Every sentence carries information; the caching note is the only one that reads as a trailing add-on without practical guidance for the caller.

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

Completeness3/5

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

For a six-parameter tool with no annotations and no output schema, the description covers input-side behavior well but never says what comes back — presumably the translated markdown plus any reported lost spans and untranslated segments. That return-shape gap is the main incompleteness given the absence of an output schema.

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

Parameters3/5

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

Schema coverage is 100% and every parameter including the two enums is documented inline, so the schema already does the work. The description adds no additional meaning about from/to, model selection, or the onLostSpan/onUntranslated modes, making the baseline 3 correct.

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

Purpose4/5

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

States a specific verb and resource ("Translate a markdown document") and sharpens scope by describing exactly what is preserved and what is translated. It does not, however, explicitly distinguish itself from siblings like translate, translate_all, or translate_readme, so the agent must infer that this is the markdown-specific variant.

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

Usage Guidelines3/5

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

Usage is only implied: the tool is for markdown documents with structure worth preserving. There is no explicit when-to-use versus translate or translate_readme, and no stated prerequisites (e.g. that a language must be supported per list_languages, or that a model must be available).

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