Skip to main content
Glama

Apply safe SRT fixes

fix_srt

Apply safe mechanical corrections to an SRT file: renumber cues, normalize timestamps to HH:MM:SS,mmm, and wrap long lines. Returns the updated SRT plus remaining issue counts that need manual review.

Instructions

Apply only safe, mechanical fixes to an SRT document: renumber cues to 1…n (inserting a missing index), normalize timestamps to HH:MM:SS,mmm, and wrap long lines at spaces (English) or at a character (CJK). Does not change overlaps, negative/zero duration, or high CPS — those need a human look. Returns the updated SRT text and remaining issue counts.

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>"
    },
    "name": "fix_srt"
  }
}

Input Schema

NameRequiredDescriptionDefault
srtYesFull SRT file contents
fixesNoWhich safe fixes to apply. Defaults to all three.
maxCpsEnNoMax characters per second for Latin cues (default 21)
maxCpsCjkNoMax characters per second for CJK cues (default 9)
maxCharsEnNoMax characters per Latin line (default 42)
maxCharsCjkNoMax characters per CJK line (default 16)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.0.1

TDQS

A4.5/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does well: it discloses scope limits, that the operation is text-in/text-out rather than a file write ('Returns the updated SRT text'), and that it reports remaining issue counts. It does not state whether the operation is idempotent or how partial `fixes` selections interact, which would be the last piece of behavioral context.

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, each load-bearing: scope, exclusions, return shape. The scope and the enumerated fixes are front-loaded so an agent can decide compatibility on the first line.

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?

For a 6-parameter pure transformation with no output schema, the description supplies what is missing: what gets changed, what is deliberately left alone, and what the response contains. An agent has enough to invoke it correctly without further inference.

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, but the description adds real meaning: it explains why there are separate English/CJK thresholds by noting lines wrap at spaces for English versus at a character for CJK, which is the rationale behind the paired maxCharsEn/maxCharsCjk parameters. Defaults and value ranges remain solely in the schema.

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?

States a specific verb ('apply') and resource ('SRT document') and then enumerates the exact three transformations (renumber, normalize timestamps, wrap lines). The phrase 'only safe, mechanical fixes' plus the list of things it will not touch clearly separates it from a diagnostic sibling like lint_srt.

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?

Gives a clear condition for use: issues that are mechanical and safe to auto-fix, with an explicit exclusion list (overlaps, negative/zero duration, high CPS) that should go to a human. It stops short of naming lint_srt as the detect-first step or stating a recommended workflow order.

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