Skip to main content
Glama

Shift the timing of an SRT file

shift_srt_file

Shift every caption in an .srt file by a seconds offset (negative moves earlier), then write the adjusted file; captions pushed before zero are dropped or clamped unless strict mode is enabled.

Instructions

Add an offset in seconds to every caption of an .srt file (negative = earlier) and write the result. Captions that would end before 0 are dropped and ones that would start before 0 start at 0, unless strict=true makes that an error. Writes to output_path (default: the same file, which needs overwrite=true). Works on the file directly; Premiere is not needed. To shift captions already on a sequence, re-import the shifted file. Returns file_path, count, dropped, clamped, first_start and last_end.

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": {
      "file_path": "<file_path>",
      "offset": "<offset>"
    },
    "name": "shift_srt_file"
  }
}

Input Schema

NameRequiredDescriptionDefault
offsetYesSeconds added to every start and end time. Negative moves captions earlier.
strictNoFail instead of dropping or clamping captions pushed before 0. Default false.
file_pathYesThe .srt file to read. Absolute path.
overwriteNoReplace output_path if it exists (required when writing over the source). Default false.
output_pathNoWhere to write the shifted file. Absolute path. Default: file_path itself.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A4.7/5.0
Behavior5/5

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

Goes well beyond the annotations by disclosing the edge-case policy up front: captions ending before 0 are dropped, those starting before 0 are clamped, and strict=true converts that into an error. It also warns that the default output_path is the source file, which requires overwrite=true, giving the agent the one precondition that could cause an unintended overwrite.

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?

Front-loads the core action and the offset sign convention, then layers edge-case policy, output target, scope note, and return fields in that order. No sentence is redundant despite covering a lot of ground.

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?

With no output schema, the description enumerates the return fields (file_path, count, dropped, clamped, first_start, last_end), and every risky behavior of a mutating tool is disclosed. Nothing an agent needs to call this correctly is missing.

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 baseline is 3, but the description adds cross-parameter meaning the schema does not spell out as a whole: the offset's sign convention, the strict/offset interaction, and the output_path-plus-overwrite dependency. It does not add units or format detail for offset beyond the schema, hence a 4 rather than 5.

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 (add an offset), a specific resource (every caption of an .srt file) and the side effect (write the result). It also carves out a clear boundary against sequence-level work by saying Premiere is not needed and that sequence captions require re-importing the shifted file.

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 concrete context: use it directly on a file, and if the captions live on a sequence, shift the file then re-import. Exclusions are implied rather than stated as named alternatives (no sibling tool is named), so it stops just short of a 5.

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