Skip to main content
Glama
DeepL
by DeepL

translate-text

Translate text to a target language via DeepL API, with options for glossaries, formality, and preserving formatting for accurate results.

Instructions

Translate text to a target language using DeepL API. Review all available optional parameters and use those applicable to your scenario for best results. When the translation includes a glossary, you must specify the source language as well as the target language. If the user requests a glossary by name instead of by id, you can use the list-glossaries tool to get a name for each id.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
textYesText to translate, as a single string or an array of strings handled independently
contextNoRecommended: describe what this text is about (e.g., 'Technical documentation for a software API'). Improves translation accuracy but is not itself translated.
styleIdNoStyle rule ID to apply. Use the list-style-rules tool to discover available style rules.
formalityNoControls formality: 'less' for informal, 'more' for formal/polite, 'prefer_less'/'prefer_more' to prefer but fall back to default
glossaryIdNoGlossary ID to ensure consistent terminology translation
sourceLangCodeNosource language code, in standard ISO-639-1 format (e.g. 'en', 'de', 'fr'), or leave empty for auto-detection
splitSentencesNoSentence splitting: '0' disables, '1' (default) splits on punctuation and newlines, 'nonewlines' preserves line breaks
targetLangCodeYestarget language code, in standard ISO-639-1 format (e.g. 'en-US', 'de', 'fr')
customInstructionsNoArray of custom instructions to guide translation style (max 10 instructions, 300 chars each)
preserveFormattingNoSet to true to preserve original formatting - recommended for markdown, code blocks, HTML, or any structured text
Behavior3/5

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

With no annotations, the description carries the burden. It discloses the underlying API (DeepL), a constraint (glossary forces source language), and a tip (context improves accuracy). However, it does not mention authentication, rate limits, error behavior, or how array inputs are reflected in the response. Still, it adds meaningful usage constraints beyond the schema.

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

Conciseness5/5

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

Three sentences, front-loaded with the primary purpose. Every sentence earns its place: the first states what it does, the second guides parameter use, and the third clarifies a non-obvious rule and points to a sibling tool. No fluff or repetition.

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

Completeness4/5

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

For a tool with 10 parameters, no output schema, and no annotations, the description covers key behavioral nuances (glossary constraint, optional parameters, glossary lookup path). It does not describe the return format, but the schema already explains array handling ('handled independently'), and translation output is intuitive. The guidance is sufficient for an agent to use it correctly in most scenarios.

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 coverage is 100%, so the baseline is 3. The description adds value by explaining the interaction between glossaryId and sourceLangCode (must specify source when glossary is used) and points to list-glossaries for resolving names. This goes beyond the schema's field-level descriptions, which don't mention the coupling.

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?

The description opens with a clear verb+resource: 'Translate text to a target language using DeepL API.' This immediately distinguishes it from sibling tools like translate-document (which handles documents) and rephrase-text (which rewrites rather than translates).

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

Usage Guidelines4/5

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

Provides concrete guidance: 'Review all available optional parameters and use those applicable to your scenario' and specifies that a glossary requires the source language. It names an alternative tool (list-glossaries) for resolving glossary names to IDs, which helps with tool selection. It does not explicitly contrast with translate-document, but the text focus is implied.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/DeepL/deepl-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server