Skip to main content
Glama

get_subtitles

Retrieve YouTube video subtitles as text, preferring human captions and falling back to auto-generated tracks. Supports language selection, timestamped excerpts, and resumable reading for long videos.

Instructions

Read a video's subtitles as text.

Returns human-written captions when they exist, otherwise the
auto-generated track. Output is truncated at `max_chars`; when that
happens the response ends with the timestamp to resume from, which
you pass back as `start_time` to read on.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
langNoPreferred language codes, comma-separated and in priority order (e.g. 'ko,en'). Falls back left to right.en
videoYesYouTube URL or 11-character video ID
refreshNoBypass the cache and refetch. Transcripts are cached on disk for 30 days; use this only when the captions are known to have changed.
end_timeNoEnd of the excerpt, in seconds.
max_charsNoCharacter budget for the returned text.
start_timeNoStart of the excerpt, in seconds.
timestampsNoPrefix each block with its start time. Costs roughly 15% more tokens; enable only when you need to cite or link to moments in the video.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Install Server

TDQS

A4.2/5.0
Behavior4/5

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

With no annotations, the description carries full responsibility for behavioral disclosure. It clearly explains truncation at max_chars, the resume mechanism via start_time, and the fallback from human-written captions to auto-generated tracks. These are meaningful behavioral insights beyond what annotations would provide. It does not mention caching behavior, but that is a minor omission given the schema covers the refresh param.

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?

The description is exceptionally concise, with the core purpose in the first sentence and key behavioral details in a short second paragraph. Every sentence earns its place: the truncation/resume mechanism is explained in a clear, actionable way without fluff. It is front-loaded and easy to scan.

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 tool with 7 parameters and a rich schema, the description covers the core behavior (reading text, fallback, truncation) but does not explain caching/refresh or language fallback in the description itself. However, these are fully documented in the schema, and an output schema exists, so the description need not detail return structure. It is sufficiently complete for an agent to use correctly, though a brief note on caching would make it more self-contained.

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 description coverage is 100%, so the baseline is 3. The description adds value by explaining the relationship between max_chars and start_time for paginated reading, and clarifies the return behavior when truncation occurs. This goes beyond the schema's bare parameter definitions. Other parameters like lang, timestamps, and end_time are not explained in the description but are well-documented in the schema.

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 opens with a clear, specific action: 'Read a video's subtitles as text.' It also distinguishes the tool from siblings (list_subtitle_tracks, search_subtitles) by focusing on reading the actual subtitle content rather than listing or searching tracks. The inclusion of fallback behavior further clarifies exactly what is returned.

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?

The description implies usage for reading subtitle text, but does not explicitly state when to prefer this tool over the sibling tools. There is no mention of 'use this when you need the full transcript' or 'use list_subtitle_tracks to see available tracks.' It provides clear context but lacks explicit alternatives or exclusions.

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

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/YaleDevUni/yt-sub-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server