Skip to main content
Glama

Youtube Search In Transcript

youtube_search_in_transcript

Search a YouTube video's transcript for a keyword or phrase and return only matching segments with timestamps, avoiding the need to fetch the entire transcript.

Instructions

Search inside a video's transcript and return only the matching segments.

A case-insensitive substring search over the caption segments, done server-side, so a narrow question ("does this video mention Kubernetes?") costs a few hundred tokens instead of the whole transcript. Returns matching segments with their start seconds (deep-link ready), total_matches across the whole transcript, and up to 20 matches per page.

Limitations: matching is per caption segment, so a phrase spanning a segment boundary will not match; the query is a literal substring, not a boolean/regex expression. Pass cursor back to page through more than 20 matches; next_cursor: null means you have the last page. language selects the caption track (defaults to the configured language). Costs no Data API quota; cached like the other transcript tools.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYes
cursorNo
languageNo
video_idYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYes
matchesYes
video_idYes
truncatedYes
next_cursorYes
language_codeYes
total_matchesYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.8/5.0
Behavior5/5

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

With no annotations provided, the description carries the full burden and does so richly: server-side case-insensitive substring matching, per-segment matching limitation, literal-not-regex semantics, pagination via cursor with next_cursor:null signaling the last page, language default behavior, and 'costs no Data API quota; cached.' This is exactly the behavioral disclosure a mutation-free search tool needs.

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 one-line purpose, then layers limitations, then parameter/pagination notes. Despite its length every sentence adds distinct, actionable information (matching semantics, token savings, quota, caching) rather than restating the name.

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?

Although an output schema exists (so return shape need not be explained), the description still clarifies the match payload (start seconds, total_matches, up to 20 per page), pagination, and matching limitations. Combined with the schema, an agent has everything needed to call and interpret it correctly.

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: it explains `query` is a literal substring (not boolean/regex), `cursor` enables paging past 20 matches, `next_cursor: null` marks the end, and `language` selects the caption track with a default. Only `video_id` is left to the obvious name, which is acceptable.

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+resource: 'Search inside a video's transcript and return only the matching segments.' It clearly contrasts with the sibling youtube_get_transcript by emphasizing it returns only matches rather than the full transcript, letting an agent distinguish it 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 Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives a clear usage context with a concrete example ('does this video mention Kubernetes?') and frames the cost tradeoff against pulling the whole transcript, implicitly routing away from youtube_get_transcript. It does not name the alternative sibling explicitly, so it falls just short of 5.

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