Skip to main content
Glama
l4b4r4b4b4

YouTube MCP Server

by l4b4r4b4b4

search_channels

Search YouTube channels by query, returning names, descriptions, thumbnails, and URLs with cached results to reduce API usage.

Instructions

Search for YouTube channels by query string.

Searches YouTube and returns channel results with names, descriptions,
thumbnails, and URLs. Results are cached for 6 hours to minimize
API quota usage.

Args:
    query: Search query (e.g., "Vimjoyer", "NixOS channels").
    max_results: Maximum results to return (1-50, default 5).

Returns:
    List of channel results with channel_id, title, description,
    url, thumbnail, and published_at.

Example:
    >>> results = _search_channels("vimjoyer", 5)
    >>> print(results[0]["title"])

Note:
    - Search costs 100 quota units per request
    - Results cached for 6 hours in youtube.search namespace
    - Use get_cached_result() to paginate large result sets

Caching Behavior:

  • Parameters that accept reference strings can accept a ref_id from a previous tool call

  • Large results return ref_id + preview; use get_cached_result to paginate

  • All responses include ref_id for future reference

Ref input compatibility: Support depends on the tool's input schema/validation. Some strictly typed parameters may reject string ref_ids before resolution.

Full retrieval: Use get_cached_result(ref_id, full=True) to get the complete value.

Preview Size: server default. Override per-call with get_cached_result(ref_id, max_size=...).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYes
max_resultsNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior5/5

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

With no annotations provided, the description fully discloses behavioral traits: results cached for 6 hours, search costs 100 quota units per request, pagination via ref_id, and caching namespace. This exceeds expectations for transparency.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The main description is clear, but the later section about caching behavior and ref input compatibility appears generic and verbose, making the overall text longer than necessary. It could be more concise without losing essential information.

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 the two parameters, the presence of an output schema (not shown but indicated), and no annotations, the description covers purpose, parameters, caching, quota, pagination, and output format. It is complete for a search tool.

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?

Schema coverage is 0%, so the description must compensate. It explains 'query' with examples like 'Vimjoyer', and 'max_results' with range (1-50) and default (5). The description adds meaningful context beyond the raw schema.

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 clearly states 'Search for YouTube channels by query string.' and specifies the returned fields (names, descriptions, thumbnails, URLs). It distinguishes from sibling search tools like search_videos or search_live_videos by focusing on channels.

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 includes an example, mentions caching duration, quota cost, and how to paginate using get_cached_result. It does not explicitly mention when to avoid this tool (e.g., if exact channel info is needed via get_channel_info), but the context is clear enough.

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/l4b4r4b4b4/yt-api-mcp'

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