Skip to main content
Glama

shift

Move SRT or WebVTT subtitle cues earlier or later by a constant millisecond or frame offset, optionally from a specific cue onward, and write the adjusted file.

Instructions

Move cues later (positive) or earlier (negative) by a constant amount, either in milliseconds or in frames at a frame rate (frames=24, fps=29.97 is exact: 29.97 means 30000/1001). Optionally only from a given cue to the end of the file. Fails instead of producing a time before 00:00:00. SRT and WebVTT only; writes a new file.

For a subtitle that is early/late by a different amount at the start and the end, use resync instead.

Args: path: .srt or .vtt file. offset_ms: milliseconds to add (negative = earlier). Give this OR frames+fps. frames: number of frames to add (negative = earlier); needs fps. fps: frame rate for frames, e.g. 23.976, 24, 25, 29.97. from_cue: 1-based cue number to start shifting from (default: every cue). output: where to write (default: .shifted. next to the input). overwrite: allow replacing an existing output file (default false). encoding: force the input text encoding. output_encoding: encoding of the written file (default utf-8).

Input Schema

NameRequiredDescriptionDefault
fpsNo
pathYes
framesNo
outputNo
encodingNo
from_cueNo
offset_msNo
overwriteNo
output_encodingNoutf-8

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.9/5.0
Behavior5/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 so: it discloses that a new file is written rather than the input modified, that the default output path is `<name>.shifted.<ext>`, that overwrite defaults to false, and that out-of-range shifts fail instead of clamping. Encoding defaults for input and output are also surfaced.

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 core behavior, the sibling alternative, and the hard constraints are front-loaded in the first paragraph, with parameters in a clean Args list. There is minor redundancy between the prose restating '(positive)'/'(negative)' and the Args entries repeating it, but nothing is filler.

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 9-parameter mutation with no annotations, the definition covers direction semantics, format restrictions, offset-vs-frames exclusivity, partial-range shifting, failure behavior, and file output. An output schema is present, so return values need not be explained, and nothing needed to invoke 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 description coverage is 0%, so the description must compensate and it does for all nine parameters: `offset_ms` and `frames`+`fps` are presented as mutually exclusive alternatives, `from_cue` is marked 1-based with 'every cue' as the default, and `output`, `overwrite`, `encoding`, and `output_encoding` each get a default and meaning.

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 description states a specific verb and resource (move cues) plus the exact directional semantics of positive vs negative offsets, so the operation is unambiguous. It also names the sibling `resync` and the condition that distinguishes it, so an agent can separate the two without opening either 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 explicitly routes the agent: for subtitles that are early/late by a different amount at start vs end, use `resync` instead. It also states hard preconditions (SRT and WebVTT only) and a failure mode (fails rather than producing a time before 00:00:00), which are the constraints an agent must check before calling.

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