Skip to main content
Glama

translate_subtitles

Translates an SRT subtitle file into a target language with OpenAI and returns the path to the translated .srt file, so you can localize videos without manual subtitle rewriting.

Instructions

Translate an SRT file to another language using OpenAI. Returns the path of the translated .srt file.

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": {
      "srt": "<srt>",
      "target_lang": "<target_lang>",
      "api_key": "<api_key>"
    },
    "name": "translate_subtitles"
  }
}

Input Schema

NameRequiredDescriptionDefault
srtYesPath to the source .srt file
api_keyYesOpenAI API key
output_dirNoOutput directory
target_langYesTarget language (e.g. 'Chinese', 'Spanish')

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.6/5.0
Behavior3/5

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

No annotations, so the description carries the full burden. It does disclose two useful traits beyond the schema: translation is performed via OpenAI (an external, network-dependent, cost-incurring call) and the result is a written .srt file path. It does not say whether an existing file in output_dir will be overwritten, what happens on API failure or partial translation, or how large files are handled.

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?

Two short sentences, zero filler, with the core action front-loaded and the return value stated second. Nothing is redundant with the title or restated.

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 four-parameter tool with no output schema, the description correctly covers the return value (path of the translated .srt) and the external dependency. It falls short only on side effects (file overwrite, output_dir creation) and failure behavior, which matter since no annotations exist to cover them.

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 all four parameters (srt, target_lang, api_key, output_dir) are already documented, including an example format for target_lang. The description adds no extra semantics such as whether output_dir is created if missing or whether api_key can come from an environment variable.

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 an SRT file to another language") and names the underlying engine (OpenAI), plus the return value. It does not distinguish itself from adjacent siblings like generate_subtitles or download_subtitle, so an agent must infer whether it is meant for existing local files only.

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 presence of an existing .srt path suggests this is for translating a file you already have, versus generating subtitles from scratch. There is no explicit when-to-use, when-not-to-use, or named alternative, and no note about whether the target language file already existing matters.

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

Deploy Server

Other Tools