Skip to main content
Glama
ClawyPro

Clawy MCP Server

by ClawyPro

deepl_translate

Translate text between 30+ languages using DeepL's neural machine translation. Specify target language, optional source language, and formality level for natural-sounding output.

Instructions

Translate text using DeepL neural machine translation. Supports 30+ languages with high-quality, natural-sounding output.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
textYesText to translate
target_langYesTarget language code (e.g., EN, KO, JA, DE, FR, ES, ZH)
source_langNoSource language code (auto-detected if omitted)
formalityNoFormality level (not all languages support this)

Implementation Reference

  • The tool execution handler in src/index.ts iterates through all registered tools (including deepl_translate) and executes them by making a call to gatewayRequest using the endpoint defined in the tool definition.
    // Register all tools
    for (const tool of allTools) {
      server.tool(
        tool.name,
        tool.description,
        tool.inputSchema.shape,
        async (params) => {
          const method = tool.method || "POST";
          const result = await gatewayRequest(method, tool.endpoint, params as Record<string, unknown>);
    
          if (result.error) {
            return {
              content: [{ type: "text" as const, text: `Error (${result.status}): ${result.error}` }],
              isError: true,
            };
          }
    
          const text = typeof result.data === "string"
            ? result.data
            : JSON.stringify(result.data, null, 2);
    
          return {
            content: [{ type: "text" as const, text }],
          };
        },
      );
    }
  • Input schema definition for the deepl_translate tool.
    inputSchema: z.object({
      text: z.string().describe("Text to translate"),
      target_lang: z.string().describe("Target language code (e.g., EN, KO, JA, DE, FR, ES, ZH)"),
      source_lang: z.string().optional().describe("Source language code (auto-detected if omitted)"),
      formality: z.enum(["default", "more", "less", "prefer_more", "prefer_less"]).optional()
        .describe("Formality level (not all languages support this)"),
    }),
  • Definition and registration of the deepl_translate tool.
    export const deeplTools: ToolDef[] = [
      {
        name: "deepl_translate",
        description: "Translate text using DeepL neural machine translation. Supports 30+ languages with high-quality, natural-sounding output.",
        inputSchema: z.object({
          text: z.string().describe("Text to translate"),
          target_lang: z.string().describe("Target language code (e.g., EN, KO, JA, DE, FR, ES, ZH)"),
          source_lang: z.string().optional().describe("Source language code (auto-detected if omitted)"),
          formality: z.enum(["default", "more", "less", "prefer_more", "prefer_less"]).optional()
            .describe("Formality level (not all languages support this)"),
        }),
        endpoint: "/v1/deepl/translate",
      },
    ];
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It mentions 'high-quality, natural-sounding output' but lacks critical details: it doesn't specify rate limits, authentication needs, error handling, or performance characteristics. For a translation tool, this omission is significant, as the agent needs to understand constraints like language support nuances or API costs.

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?

The description is highly concise and front-loaded: it states the core function in the first clause and adds supporting details efficiently. Both sentences earn their place by covering purpose and key features without redundancy, making it easy for an agent to parse quickly.

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?

Given the tool's moderate complexity (4 parameters, no output schema, no annotations), the description is partially complete. It covers the basic purpose and language support but lacks behavioral context and output details. Without annotations or an output schema, the agent must infer behavior, leaving gaps in understanding how results are structured or what errors might occur.

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 description coverage is 100%, so the input schema already documents all parameters thoroughly. The description adds no additional parameter semantics beyond implying language support and formality options. It doesn't clarify parameter interactions or provide examples beyond what's in the schema, meeting the baseline for high schema coverage.

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?

The description clearly states the tool's purpose: 'Translate text using DeepL neural machine translation.' It specifies the verb ('translate') and resource ('text'), and mentions key capabilities like supporting 30+ languages and high-quality output. However, it doesn't explicitly differentiate from sibling tools, which are unrelated (e.g., search, financial queries, maps), so the distinction is implicit rather than explicit.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives. It mentions general capabilities but doesn't specify contexts, prerequisites, or exclusions. For example, it doesn't indicate if it's for real-time translation, batch processing, or specific use cases like documents vs. conversations, leaving the agent with minimal usage direction.

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/ClawyPro/clawy-mcp-server'

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