Skip to main content
Glama

Search YouTube

search_youtube
Read-onlyIdempotent

Searches YouTube videos by keyword and returns up to 20 videos (title, url, channel, published_at, views, duration, description), localized by country and language. It does not return transcripts (use youtube_transcript with a video ID), comments or channel pages. 5 credits per successful call; a search with no matches is charged, errors are not. Required: query.

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": {
      "query": "<query>"
    },
    "name": "search_youtube"
  }
}

Input Schema

NameRequiredDescriptionDefault
queryYesVideo search text, 1-500 characters, e.g. "espresso tutorial".
countryNoTwo-letter country code that localizes the videos, e.g. "it" or "gb". Omit for the source default, us.
resultsNoMaximum videos returned, integer 1-20, default 10, e.g. 5.
languageNoTwo-letter language code for the results, e.g. "en" or "it". Omit for the source default, en.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changed
    • changedInput schema / properties / country / description
      Previous value: -"Two-letter country code used to localize video results."New value: +"Two-letter country code that localizes the videos, e.g. \"it\" or \"gb\". Omit for the source default, us."
    • changedInput schema / properties / language / description
      Previous value: -"Two-letter language code for video results."New value: +"Two-letter language code for the results, e.g. \"en\" or \"it\". Omit for the source default, en."
    • changedInput schema / properties / query / description
      Previous value: -"YouTube search query."New value: +"Video search text, 1-500 characters, e.g. \"espresso tutorial\"."
    • changedInput schema / properties / results / description
      Previous value: -"Maximum number of videos to return."New value: +"Maximum videos returned, integer 1-20, default 10, e.g. 5."
  2. First observed

TDQS

A4.7/5.0
Behavior5/5

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

Beyond annotations, which already declare read-only, open-world, idempotent, and non-destructive behavior, the description adds important operational context: credit consumption, that empty searches are charged, and that errors are not. It also discloses the return shape and exclusions, which meaningfully reduces uncertainty.

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 front-loaded with the core action and return scope, then adds exclusions, billing behavior, and the required parameter. Every sentence provides useful information, and there is no wasted preamble.

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 annotations covering safety traits and the schema covering all four parameters at 100%, the description fills remaining gaps: return fields, localization, exclusions, billing behavior, and the required query. No output schema exists, but the description lists the returned fields, so the definition is complete enough to invoke correctly.

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 the schema already documents query, country, language, and results in detail. The description adds localization context and the 20-video cap, but it does not provide parameter semantics beyond what the schema already states.

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 states a specific verb and resource: searches YouTube videos by keyword, with return fields and localization scope. It also distinguishes the tool from youtube_transcript by explicitly saying transcripts are not returned. An agent can identify exactly what this tool does without opening the schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

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

It explicitly says the tool does not return transcripts, comments, or channel pages, and it names youtube_transcript as the alternative for transcripts. This gives clear when-not and alternative guidance, while the required query parameter reinforces the primary usage.

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