Skip to main content
Glama
tuitamogamer-gpt

youtube-mcp-server

Search YouTube

youtube_search
Read-onlyIdempotent

Search YouTube for videos, channels, or playlists by query with filters for date, region, language, channel, and sort order.

Instructions

Search YouTube for videos, channels, and/or playlists using the YouTube Data API v3 search.list endpoint.

IMPORTANT — Quota cost: Every call to this tool costs 100 quota units (vs. 1 for most other tools). Use it sparingly and narrow the query as much as possible before calling.

Args:

  • query (required) — Free-text search query (e.g., "typescript tutorial 2024").

  • type — Comma-separated list of resource types to return. Allowed values: video, channel, playlist. Default: "video".

  • channelId — Restrict results to a specific channel's content. Optional.

  • order — Sort order: relevance (default), date, rating, title, viewCount.

  • maxResults — Number of results to return (1–50, default 25).

  • pageToken — Pagination cursor from a previous response's nextPageToken. Optional.

  • publishedAfter — Only return results published after this RFC 3339 datetime (e.g., "2024-01-01T00:00:00Z"). Optional.

  • publishedBefore — Only return results published before this RFC 3339 datetime. Optional.

  • regionCode — ISO 3166-1 alpha-2 code to bias results (e.g., "US"). Defaults to server default.

  • relevanceLanguage — ISO 639-1 language code to bias relevance (e.g., "en"). Optional.

  • forMine — When true, restricts results to the authenticated user's own videos. Requires type to include only "video". Optional.

  • response_format"markdown" (default) or "json".

Returns (JSON shape):

{
  "nextPageToken": "string | null",
  "pageInfo": { "totalResults": 1234, "resultsPerPage": 25 },
  "items": [
    {
      "kind": "youtube#searchResult",
      "id": { "kind": "youtube#video", "videoId": "abc123" },
      "snippet": {
        "publishedAt": "2024-01-15T12:00:00Z",
        "channelId": "UCxxx",
        "title": "Result title",
        "description": "Short description...",
        "thumbnails": { "default": { "url": "..." } },
        "channelTitle": "Channel Name",
        "liveBroadcastContent": "none"
      }
    }
  ]
}

Examples:

  1. Search for recent TypeScript videos: { "query": "typescript tutorial", "order": "date", "maxResults": 10 }

  2. Search own channel for a topic: { "query": "react hooks", "forMine": true, "type": "video" }

  3. Paginate to the next page: { "query": "nodejs", "pageToken": "<nextPageToken from previous call>" }

Common Errors:

  • 403 quotaExceeded — Daily quota exhausted (each call costs 100 units). Try again after midnight Pacific time.

  • 400 invalidSearchFilter — Conflicting filters, e.g. forMine:true with type containing non-video values.

  • 401 / 403 authError — Credentials missing or expired; re-run npm run auth.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYesFree-text search query string.
typeNoComma-separated list of resource types: video, channel, playlist. Default: "video".video
channelIdNoRestrict results to a specific channel ID.
orderNoSort order for results. One of: relevance (default), date, rating, title, viewCount.relevance
maxResultsNoNumber of results to return (1–50). Default: 25.
pageTokenNoPagination cursor. Pass the nextPageToken from a previous response to get the next page.
publishedAfterNoRFC 3339 datetime — only return results published after this time (e.g. 2024-01-01T00:00:00Z).
publishedBeforeNoRFC 3339 datetime — only return results published before this time.
regionCodeNoISO 3166-1 alpha-2 region code to bias results (e.g. "US"). Defaults to US.
relevanceLanguageNoISO 639-1 language code to bias relevance ranking (e.g. "en").
forMineNoWhen true, restricts search to the authenticated user's own videos. Requires type to be "video" only.
response_formatNoOutput format: "markdown" (default, human-readable) or "json" (full structured data).markdown
Behavior5/5

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

Beyond annotations (readOnlyHint=true, destructiveHint=false), the description adds critical behavioral details: quota cost per call, endpoint used (search.list), and common errors (e.g., quotaExceeded). No contradictions.

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 well-structured with clear sections (warning, args, returns, examples, errors), is front-loaded with the important quota warning, and every sentence adds value without redundancy.

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?

Given 12 parameters, 100% schema coverage, and no output schema, the description provides return JSON shape, examples, and common errors, making it fully complete for effective use.

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

Parameters5/5

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

With 100% schema description coverage, the description adds even more: default values, allowed enums, constraints (e.g., forMine requires type=video), examples, and a full JSON return shape.

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 uses a specific verb ('Search') and identifies the resource ('YouTube for videos, channels, and/or playlists'), clearly differentiating it from sibling tools like youtube_get_video or youtube_list_playlists.

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?

The description warns about high quota cost (100 units per call) and advises to use sparingly and narrow queries. However, it does not explicitly state when to use alternatives like youtube_get_video for single videos.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/tuitamogamer-gpt/youtube-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server