Skip to main content
Glama

youtube_search

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

Input Schema

TableJSON 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 | date | views | rating (alias: popular→views).
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 / 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."
  2. 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)."
  3. 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"
      +}
  4. 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."
  5. 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"
      +}
  6. First observed

TDQS

A3.7/5.0
Behavior4/5

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

With no annotations, the description carries the full disclosure burden. It does well by explaining credit cost, that empty results and failures are never charged, cache behavior, and that the default is always fresh. This adds meaningful behavior information beyond the schema, though it slightly repeats the credit cost and does not address potential rate limits.

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?

The description is compact and mostly front-loaded, with key capabilities and credit pricing near the start. The only flaw is minor redundancy: '2 credits/page' and 'Costs 2 credits' convey the same fact twice. Otherwise, every sentence earns its place.

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?

Given 9 parameters, no output schema, and no annotations, the description covers the essential context: result contents, pagination, filters, cost, cache, and failure charging. It does not describe result count behavior beyond the limit parameter or elaborate on error responses, but the schema plus description are sufficient for an agent to invoke the tool 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?

The schema already describes all 9 parameters with 100% coverage, so the baseline is 3. The description adds context around pagination (nextCursor flow), cost per page, and cache=true semantics, but does not clarify region, sortBy, duration, or uploadDate beyond the schema. This is adequate but not exceptional.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states a specific action ('YouTube search'), the resource, and distinctive features like cursor pagination, typed hits, ids, canonical URLs, and filters. It differentiates from many sibling tools by describing a general search that covers multiple result types, but it does not explicitly name an alternative such as youtube_hashtag_search, so it stops short of a 5.

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?

Usage is implied through the name and description: use this tool to search YouTube across videos, shorts, channels, and playlists. However, there is no explicit 'when to use vs. alternatives' guidance, and no exclusions like 'for hashtag-specific search, use youtube_hashtag_search.' This makes it adequate but not strong.

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.