Skip to main content
Glama

youtube_search

Read-onlyIdempotent

Search YouTube videos by query, channel, date range, duration, and sort order. Automatically switches between the Data API and yt-dlp to deliver results.

Instructions

Search YouTube videos. Uses Data API v3 when YOUTUBE_API_KEY is set, falls back to yt-dlp. Filters: date range, channel, duration, order.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNoMax results (default 10, max 50)
orderNoSort: date, rating, relevance, viewCount, title (API only)
queryYesSearch query
channel_idNoRestrict to channel ID (API only)
video_durationNoshort, medium, long (API only)
published_afterNoISO 8601 date filter (API only)
published_beforeNoISO 8601 date filter (API only)
Behavior4/5

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

While annotations already declare readOnly/open world/idempotent behavior, the description adds valuable non-obvious behavioral context: the tool switches between Data API v3 and yt-dlp depending on API key presence. This affects result consistency and feature availability, going beyond what annotations express. It also lists supported filters, giving a clearer operational picture.

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 extremely concise: two sentences front-loaded with the core purpose, followed by backend behavior and filter list. Every word earns its place, with no redundancy or filler.

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 the tool has 7 parameters, no output schema, and good annotations, the description covers purpose, backend behavior, and filters. However, it does not mention return format or pagination behavior, and the fallback mode's impact on filter availability is only indirectly indicated via the schema. Still, the description is largely complete for a search tool with rich schema.

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%, and the schema already documents each parameter with descriptions and the '(API only)' caveat. The description's filter list (date range, channel, duration, order) maps to existing schema properties but adds no new syntax or semantic details beyond the structured definitions. Baseline of 3 is appropriate.

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 opens with 'Search YouTube videos,' a specific verb+resource that clearly distinguishes this from sibling tools like youtube_search_channels (for channels) and youtube_get_channel_videos (for videos from a channel). It also enumerates key filters, reinforcing scope.

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 provides clear usage context by noting the backend selection (API vs yt-dlp) based on YOUTUBE_API_KEY availability. However, it does not explicitly mention alternatives like youtube_search_channels or explain when not to use this tool, so it falls short of a 5.

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/TheWhiteWater/tube-bridge'

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