Skip to main content
Glama

search_subtitles

Searches subtitle files for cues containing a phrase or regular expression and returns matching cue numbers and timestamps.

Instructions

Find cues whose text contains a phrase (or matches a regular expression), with cue number and timestamps. Matching ignores line breaks inside a cue (they count as a space), so a phrase split over two lines is still found. Markup tags are searched too.

Args: path: subtitle file. query: text to find, or a Python regular expression when regex=true. regex: treat query as a regular expression. case_sensitive: default is case-insensitive. limit: maximum matches to show (default 50). encoding: force a text encoding.

Input Schema

NameRequiredDescriptionDefault
pathYes
limitNo
queryYes
regexNo
encodingNo
case_sensitiveNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.6/5.0
Behavior3/5

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

With no annotations, the description carries the whole burden. It usefully discloses that line breaks count as spaces, that markup tags are searched, and the default match limit, but says nothing about invalid-regex handling, missing files, or whether hitting 'limit' is signalled.

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?

Front-loaded with the matching semantics before an Args block that stays tight. Every sentence carries information; minor redundancy between the prose and the Args entry for 'query'.

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?

Return values needn't be explained because an output schema exists, and the search-matching rules are covered. The remaining gap is edge-case behavior (invalid regex, truncation at limit) for a tool with six parameters and no annotations.

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 0%, so the description does real work: it explains all six parameters, including that 'query' becomes a Python regex under regex=true and that case-insensitive is the default. It omits what the default encoding is and what path formats are accepted.

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 ('Find cues whose text contains a phrase...') plus the returned fields (cue number, timestamps). That scope implicitly separates it from read_cues and subtitle_info, but no sibling is named explicitly.

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 search semantics but never stated as when-to-use versus read_cues or fix_common_problems. There are no exclusions and no guidance on which tool to pick when you just want to read the file.

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