Skip to main content
Glama

youtube_search

YouTube search with cursor pagination — typed hits, ids, canonical URLs, filters (2 credits/page, 0 when a page finds nothing). Costs 2 credits. Empty results and failures are never charged. Pass cache=true for a free 24h cache hit (default always fresh).

Input Schema

NameRequiredDescriptionDefault
qYesSearch query or keywords (min 2 characters).
typeNoall | videos | shorts | channels | playlists.
cacheNoSet true to serve from the 24h response cache (0 credits on hit). Default false — always fetch fresh.
limitNoMax items to return (default 20, max 200). Flat 2 credits per call.
cursorNoPagination cursor. Leave empty for the first page; then pass the nextCursor value returned in the previous response.
regionNoISO country code for localized results (default US).
sortByNorelevance | views (alias: popular→views). date and rating answer 400 SORT_NOT_SUPPORTED: YouTube no longer orders search by upload date (use uploadDate) or by rating. With type=shorts only relevance is supported.
durationNoany | under_4 | 4_20 | over_20. Applies to long-form videos (not Shorts).
uploadDateNoany | today | this_week | this_month | this_year.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / sortBy / description
      Previous value: -"relevance | date | views | rating (alias: popular→views)."New value: +"relevance | views (alias: popular→views). date and rating answer 400 SORT_NOT_SUPPORTED: YouTube no longer orders search by upload date (use uploadDate) or by rating. With type=shorts only relevance is supported."
  2. Changed1 schema field changed
    • changedInput schema / properties / cache / description
      Previous value: -"Set true to serve from the 24h response cache (0 credits on hit). Default false — always fetch fresh. Envelope includes cached + cachedAt on hits."New value: +"Set true to serve from the 24h response cache (0 credits on hit). Default false — always fetch fresh."
  3. Changed7 schema fields changed
    • changedInput schema / properties / cache / description
      Previous value: -"Set true to serve from the 24h response cache. Default false — always fetch fresh data."New value: +"Set true to serve from the 24h response cache (0 credits on hit). Default false — always fetch fresh. Envelope includes cached + cachedAt on hits."
    • changedInput schema / properties / cursor / description
      Previous value: -"Pagination cursor from nextCursor."New value: +"Pagination cursor. Leave empty for the first page; then pass the nextCursor value returned in the previous response."
    • changedInput schema / properties / duration / description
      Previous value: -"any | under_4 | 4_20 | over_20."New value: +"any | under_4 | 4_20 | over_20. Applies to long-form videos (not Shorts)."
    • changedInput schema / properties / limit / description
      Previous value: -"Max items to return. Default 20, max 200. Billed per result."New value: +"Max items to return (default 20, max 200). Flat 2 credits per call."
    • changedInput schema / properties / q / description
      Previous value: -"Search query or keywords (min 2 chars)."New value: +"Search query or keywords (min 2 characters)."
    • changedInput schema / properties / region / description
      Previous value: -"ISO country code (default US)."New value: +"ISO country code for localized results (default US)."
    • changedInput schema / properties / sortBy / description
      Previous value: -"relevance | date | views | rating."New value: +"relevance | date | views | rating (alias: popular→views)."
  4. Changed6 schema fields changed
    • addedInput schema / properties / cursor
      Added value: +{
      +  "description": "Pagination cursor from nextCursor.",
      +  "type": "string"
      +}
    • addedInput schema / properties / duration
      Added value: +{
      +  "description": "any | under_4 | 4_20 | over_20.",
      +  "type": "string"
      +}
    • addedInput schema / properties / region
      Added value: +{
      +  "description": "ISO country code (default US).",
      +  "type": "string"
      +}
    • addedInput schema / properties / sortBy
      Added value: +{
      +  "description": "relevance | date | views | rating.",
      +  "type": "string"
      +}
    • addedInput schema / properties / type
      Added value: +{
      +  "description": "all | videos | shorts | channels | playlists.",
      +  "type": "string"
      +}
    • addedInput schema / properties / uploadDate
      Added value: +{
      +  "description": "any | today | this_week | this_month | this_year.",
      +  "type": "string"
      +}
  5. Changed1 schema field changed
    • changedInput schema / properties / cache / description
      Previous value: -"Responses are cached for 24 hours by default. Set false to bypass the cache and always fetch fresh data (default true)."New value: +"Set true to serve from the 24h response cache. Default false — always fetch fresh data."
  6. Changed1 schema field changed
    • addedInput schema / properties / cache
      Added value: +{
      +  "description": "Responses are cached for 24 hours by default. Set false to bypass the cache and always fetch fresh data (default true).",
      +  "type": "boolean"
      +}
  7. First observed

TDQS

A3.9/5.0
Behavior4/5

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

With no annotations to lean on, the description carries the burden well: it discloses billing behavior (2 credits/page, free when a page finds nothing, empty results and failures never charged) and the cache trade-off (free 24h hit vs default always-fresh). It omits auth requirements and rate limits, but the cost/charge semantics are the high-value behavioral facts here.

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 pagination are front-loaded, and the sentence lengths are tight. The credit cost is restated three times ('2 credits/page', 'Costs 2 credits', 'never charged'), which is slightly redundant but not egregious.

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 9-parameter search tool with no output schema and no annotations, the description covers the essentials an agent needs: pagination via cursor, billing, caching, and the fact that results are typed hits with URLs. It could say more about the result envelope, but the core calling contract is complete.

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 coverage is 100%, so every parameter is already documented, including the SORT_NOT_SUPPORTED quirks for sortBy and the credit cost tied to limit. The description reinforces pagination and cost-per-page but adds little the schema does not already say, so the baseline 3 applies.

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 (search) and resource (YouTube) and immediately scopes it with the payload ('typed hits, ids, canonical URLs, filters') and pagination model. An agent can tell this is a discovery/search tool distinct from detail or transcript siblings.

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?

It gives clear operational guidance on the cache parameter (when to pass cache=true vs the default fresh fetch), but it never states when to reach for youtube_search versus near-neighbors like youtube_hashtag_search, youtube_trending_shorts, or the platform search siblings. Usage is implied by the search verb rather than routed.

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.