Skip to main content
Glama

YoutubeToText

Generate subtitles

get_subtitles

Queue a YouTube video for subtitle generation. Returns the job id, its duration in seconds and the minutes it takes from the account (1 per started minute of video, plus as much again per translation; null when the length is not known yet). Poll get_transcription until state is done, passing the requested format (srt or webvtt); the subtitles are in content, and srt_url/webvtt_url download them whole. Pass target_languages (max 10, e.g. ["Spanish", "French"]) to also translate the subtitles: each language appears in the result's translations array with its own srt/webvtt, and adds 1x the video length to the account's minute usage. tag_audio_events marks non-speech audio with tags like (laughter) or [music]; off by default, and the tag language may not match the video's. lyrics (songs, off by default) builds the subtitles from the song's published lyrics, showing every line where several singers sing at once; the result's lyrics_status is applied when it did, otherwise the subtitles are the usual ones.

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": {
      "url": "<url>"
    },
    "name": "get_subtitles"
  }
}

Input Schema

NameRequiredDescriptionDefault
urlYesLink to one YouTube video: youtube.com/watch?v=<id>, youtu.be/<id>, or a /shorts/, /live/ or /embed/ link (m.youtube.com works too). Playlist and channel links are refused; use `get_playlist` and `transcribe_playlist` for those.
formatNoThe subtitle format the user wants: `srt` (most editors) or `webvtt` (web players). Pass the same value as `format` to `get_transcription`. Both are produced either way.srt
lyricsNoFor songs: build the subtitles from the song's published lyrics, timed on the audio, so every line shows where several singers sing at once. Off by default. Falls back to normal subtitles when no lyrics are found or they do not match; `lyrics_status` on the result says which happened. No extra cost.
verbatimNoKeep filler words (um, uh), false starts and repetitions instead of cleaning them up. Off by default. Same cost either way.
language_codeNoThe video's spoken language as an ISO-639-1 or ISO-639-3 code, e.g. "en", "es" or "yue"; a region subtag is dropped ("en-US" is "en"). Omit to auto-detect. Set it when the language is known: it improves accuracy and keeps the right alphabet.
tag_audio_eventsNoMark non-speech audio with tags like (laughter) or [music]. Off by default: the transcriber picks the tag language itself and it may not match the video's.
target_languagesNoAlso translate the subtitles into these languages, as names in English, e.g. ["Spanish", "French"]. At most 10. Each language adds 1x the video length to the minutes used, so confirm the cost with the user before asking for several.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.4/5.0
Behavior5/5

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

Beyond the annotations (openWorld, non-idempotent, non-destructive), it discloses the async queue-and-poll contract, the billing model (1 minute per started minute, plus 1x per translation language), defaults for `tag_audio_events` and `lyrics`, and graceful fallbacks (`lyrics_status` applied vs normal subtitles). This is behavior an agent cannot infer from the annotations alone.

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?

Purpose and workflow are front-loaded in the first two sentences, and every sentence carries real information. It runs long as a single dense paragraph, and the parameter recap overlaps the already-complete schema, keeping it from a 5.

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 carries the return-value burden itself and does so: `id`, `duration`, `minutes`, `content`, `srt_url`/`webvtt_url`, `translations`, `lyrics_status`. For a multi-step, cost-bearing async tool this is complete enough to drive correct invocation.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so all seven parameters are already documented. The description largely restates that schema text (format, lyrics fallback, tag-language caveat, target_languages cost), so it sits at the baseline rather than adding substantial new meaning; the one extra is tying the polling `format` to `get_transcription`.

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?

"Queue a YouTube video for subtitle generation" is a specific verb plus resource, and the description immediately frames the async job model (returns `id`, must poll `get_transcription`), which separates it from the sibling that fetches results and from `burn_subtitles`.

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?

It gives clear operational guidance: poll `get_transcription` until `state` is `done`, reuse the same `format` value there, and confirm translation cost with the user before requesting several languages. What is missing is an explicit statement of when to pick this over `transcribe` or `transcribe_playlist` in the description body (the playlist branch is only covered inside the `url` schema field).

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources