Skip to main content
Glama

Lint an SRT file

lint_srt

Parse SubRip (.srt) files and return diagnostics for cue numbering, invalid or overlapping timestamps, reading speed, long lines, empty cues, and WebVTT mislabeling.

Instructions

Parse a SubRip (.srt) document and return diagnostics for cue numbering, invalid or odd timestamps, end-before-start (negative duration), zero duration, overlaps, reading speed (CPS), line length, empty cues, too many lines, and WebVTT mislabelled as SRT. Character counts use Intl.Segmenter graphemes and ignore simple subtitle markup.

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": "lint_srt"
  }
}

Input Schema

NameRequiredDescriptionDefault
srtYesFull SRT file contents
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

A3.8/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 much of it: it discloses the complete set of conditions checked and, crucially, the counting methodology ('Intl.Segmenter graphemes and ignore simple subtitle markup') that determines whether a CPS or line-length diagnostic fires. It stops short of describing the diagnostic record shape — severity, codes, or whether parsing halts on the first failure — which matters since no output schema exists.

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?

Two sentences, with the verb-and-resource framing front-loaded before the diagnostic list. The long enumeration is dense but each item is a distinct check, so it earns its space; the phrasing is slightly comma-spliced but never padded.

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 read-only linter with no annotations and no output schema, the description is nearly sufficient: it implies a non-mutating parse and enumerates the findings returned. The remaining gap is the return contract's structure — no mention of severity levels or result ordering — which an agent would want before formatting output.

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 threshold parameters and their defaults are already documented, making 3 the baseline. The description adds meaning beyond that by explaining that character counts are grapheme-based and markup-stripped, which is what makes the maxCps and maxChars thresholds interpretable rather than arbitrary.

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 ('Parse a SubRip (.srt) document') and enumerates exactly what kinds of diagnostics come back, from cue numbering to WebVTT mislabelling. It does not, however, distinguish itself from the sibling tools fix_srt and srt_stats, so an agent must infer that this one only reports rather than repairs or summarizes.

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 implied by the verb 'lint' and the diagnostic list, so an agent can tell this is for validating an SRT file. There is no explicit when-to-use or when-not guidance, and the siblings (fix_srt, srt_stats) are never referenced as alternatives or follow-ups.

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