Skip to main content
Glama

chunk_for_translation

Splits subtitle files into cue batches with stable IDs and text so an AI agent can translate them in manageable chunks and preserve timing.

Instructions

Step 1 of translating a subtitle. Returns one batch of cues as JSON: each cue has a stable id (its 1-based position in the file) and its text (line breaks as \n, tags included). The server never translates: YOU translate the texts, then call apply_translation with a mapping {"": ""} covering every id of the file.

Rules for the translation: keep every id; keep formatting tags such as and {\an8} exactly; keep line breaks (\n) where they make sense; keep it about as long as the original (subtitles are read against a clock). The response says how many chunks exist; call again with chunk=2, 3, ... until all are done, then send ONE mapping with all ids.

Args: path: .srt or .vtt file. max_chars: approximate size of a batch in characters of cue text (default 1500, min 200). chunk: which batch to return, starting at 1. encoding: force the input text encoding.

Input Schema

NameRequiredDescriptionDefault
pathYes
chunkNo
encodingNo
max_charsNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.7/5.0
Behavior4/5

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

With no annotations supplied, the description carries the disclosure burden and does well: it states the server never translates, that ids are stable 1-based positions, that line breaks are \n and tags are preserved, and that the response reports the chunk count. It never explicitly says the call is a non-mutating read or whether repeated calls with different chunk values are side-effect free, which is the remaining gap.

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?

The purpose is front-loaded and the workflow, translation rules, and argument list are cleanly separated into blocks. The 'Rules for the translation' paragraph is somewhat tangential to invoking this tool and could be tightened, but it is the contract the agent must honor before calling apply_translation, so it largely earns its place.

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?

Although an output schema exists, the description still explains the payload (id plus text) and, more importantly, the multi-call workflow and the downstream apply_translation contract. For a paging tool in a two-step pipeline, nothing an agent needs in order 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.

Parameters5/5

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

Schema coverage is 0%, yet the Args block documents all four parameters: path restricted to .srt/.vtt, max_chars as approximate batch size with default 1500 and minimum 200, chunk as a 1-based batch selector, and encoding as an input-encoding override. This fully compensates for the bare schema and adds constraints (min 200, units in cue-text characters) that are absent from the structured fields.

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 first sentence names a specific role ('Step 1 of translating a subtitle') and the concrete result ('Returns one batch of cues as JSON'), which cleanly separates it from the sibling apply_translation that handles step 2. An agent can identify both the verb and the resource without inspecting 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?

It states the exact iteration protocol ('call again with chunk=2, 3, ... until all are done') and the required follow-up ('then send ONE mapping with all ids' via apply_translation). The alternative sibling is named along with the condition that triggers it, leaving no routing ambiguity.

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