Skip to main content
Glama

youtube_video_query

Read-onlyIdempotent

Ask Gemini about a YouTube video. Pass a video URL and any prompt: verbatim transcript with timestamps, summary, targeted Q&A about content or visuals, translation, etc. Works on any public/unlisted video. A summary or transcript of a video longer than about 20 minutes: pass background=true; the answer comes back at once with a job_id, and the result is saved as a workspace file (call again with job_id to get it).

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "youtube_video_query"
  }
}

Input Schema

NameRequiredDescriptionDefault
endNoOptional: ask only about the video up to this time (seconds or MM:SS / HH:MM:SS).
urlNoYouTube video URL (youtube.com/watch?v=…, youtu.be/…, youtube.com/shorts/…, m.youtube.com/watch?v=…). Required unless job_id is given.
startNoOptional: ask only about the video from this time on, as seconds or MM:SS / HH:MM:SS.
detailNoOMIT for the default 'low'. Frame resolution: 'low' (speech, slides and summaries; fits videos up to about two and a half hours) or 'default' (fine on-screen detail; about an hour at most, use it with start/end on long videos).
job_idNoOMIT to ask a new question. The job_id of a background job: returns its status (running / done / failed) and, when done, the file_id and text.
promptNoWhat to ask Gemini about the video. Required unless job_id is given. Examples: 'Provide a verbatim transcript with [HH:MM:SS] timestamps.' / 'Summarize for the course owner.' / 'Describe what's shown on screen at 0:30.'
backgroundNoOMIT for a direct answer (must arrive within about 85 s). true: run as a background job of up to 10 minutes; returns job_id at once and saves the result as a workspace file.
in_workspaceNoRun this one call in this workspace id instead of the session's. Nothing is stored; other sessions are not affected.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed8 schema fields changed
    • addedInput schema / properties / background
      Added value: +{
      +  "description": "OMIT for a direct answer (must arrive within about 85 s). true: run as a background job of up to 10 minutes; returns job_id at once and saves the result as a workspace file.",
      +  "type": "boolean"
      +}
    • addedInput schema / properties / detail
      Added value: +{
      +  "description": "OMIT for the default 'low'. Frame resolution: 'low' (speech, slides and summaries; fits videos up to about two and a half hours) or 'default' (fine on-screen detail; about an hour at most, use it with start/end on long videos).",
      +  "enum": [
      +    "low",
      +    "default"
      +  ],
      +  "type": "string"
      +}
    • addedInput schema / properties / end
      Added value: +{
      +  "description": "Optional: ask only about the video up to this time (seconds or MM:SS / HH:MM:SS).",
      +  "type": "string"
      +}
    • addedInput schema / properties / job_id
      Added value: +{
      +  "description": "OMIT to ask a new question. The job_id of a background job: returns its status (running / done / failed) and, when done, the file_id and text.",
      +  "type": "string"
      +}
    • changedInput schema / properties / prompt / description
      Previous value: -"What to ask Gemini about the video. Examples: 'Provide a verbatim transcript with [HH:MM:SS] timestamps.' / 'What is the main claim made in the first 30 seconds?' / 'Describe what's shown on screen at 0:30.' / 'Translate the spoken Spanish to English.'"New value: +"What to ask Gemini about the video. Required unless job_id is given. Examples: 'Provide a verbatim transcript with [HH:MM:SS] timestamps.' / 'Summarize for the course owner.' / 'Describe what's shown on screen at 0:30.'"
    • addedInput schema / properties / start
      Added value: +{
      +  "description": "Optional: ask only about the video from this time on, as seconds or MM:SS / HH:MM:SS.",
      +  "type": "string"
      +}
    • changedInput schema / properties / url / description
      Previous value: -"YouTube video URL. Supported forms: youtube.com/watch?v=…, youtu.be/…, youtube.com/shorts/…, m.youtube.com/watch?v=…. Pass-through to Gemini verbatim."New value: +"YouTube video URL (youtube.com/watch?v=…, youtu.be/…, youtube.com/shorts/…, m.youtube.com/watch?v=…). Required unless job_id is given."
    • changedInput schema / required
      Previous value: -[
      -  "url",
      -  "prompt"
      -]New value: +[]
  2. Changed1 schema field changed
    • addedInput schema / properties / in_workspace
      Added value: +{
      +  "description": "Run this one call in this workspace id instead of the session's. Nothing is stored; other sessions are not affected.",
      +  "type": "integer"
      +}
  3. Added
  4. Removed
  5. Added

TDQS

A4.6/5.0
Behavior5/5

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

Annotations already declare readOnlyHint/idempotentHint/non-destructive, and the description adds substantial behavior beyond them: public/unlisted-only access, an ~85 s ceiling on direct answers, a 10-minute background job limit, immediate job_id return, and persistence of the result as a workspace file. Those are exactly the operational facts an agent needs to avoid a timed-out call.

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 purpose, then the prompt examples, then the async caveat; every sentence carries information. The final sentence is a long run-on ('the answer comes back at once with a job_id, and the result is saved…') that could be split for scannability.

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?

For an 8-parameter, async-capable tool with no output schema, the description covers what to send, what comes back in each mode, and how the background job is retrieved. Combined with a fully documented input schema and confirmatory annotations, nothing essential 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 the baseline is 3, but the description adds real semantics the schema cannot: the trade-off behind background (direct answer vs. job + job_id polling + saved workspace file) and the length threshold that triggers it. It also reinforces that url/prompt are required unless job_id is given.

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 ('Ask Gemini about a YouTube video') and enumerates the concrete output kinds the agent can request: verbatim transcript with timestamps, summary, targeted Q&A about content or visuals, translation. This is clearly distinct from the youtube_delete_video / youtube_update_video siblings, which mutate video resources rather than query them.

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 an explicit condition for switching modes: a summary or transcript of a video longer than ~20 minutes should use background=true, and the agent must call again with job_id once the job finishes. It also names the job_id reuse path for polling. It does not point at a sibling for listing/finding videos, but the in-tool routing guidance is clear and actionable.

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