Skip to main content
Glama
l4b4r4b4b4

YouTube MCP Server

by l4b4r4b4b4

semantic_search_comments

Search YouTube comments using natural language queries. Automatically indexes missing comments before searching, enabling immediate results.

Instructions

Search comments using natural language with automatic indexing.

Performs semantic similarity search over video comments. Automatically indexes any missing comments before searching, providing a seamless experience without requiring explicit indexing calls.

Args: query: Natural language search query (e.g., "questions about flakes"). channel_ids: Optional list of YouTube channel IDs to scope the search. video_ids: Optional list of specific video IDs to scope the search. k: Number of results to return (default: 10). max_comments_per_video: Maximum comments to index per video (default: 100). max_videos_per_channel: Maximum videos to fetch per channel (default: 50). min_score: Optional minimum similarity score threshold (lower is better).

Returns: Dictionary with search results including: - query: The original search query - results: List of matches with video info, text, author, like_count, scores - total_results: Number of results returned - indexing_stats: Statistics about auto-indexing performed - scope: Description of search scope applied

Note: - First search on new content will be slower due to indexing - Subsequent searches are fast (already indexed) - If neither channel_ids nor video_ids provided, searches all indexed comments

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
kNo
queryYes
min_scoreNo
video_idsNo
channel_idsNo
max_comments_per_videoNo
max_videos_per_channelNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior5/5

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

No annotations, so description fully discloses auto-indexing, performance characteristics (first search slower), and scoping. Transparent about the process.

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?

Well-structured with Args, Returns, Note sections. Slightly lengthy but front-loaded with summary. Minor redundancy (e.g., automatic indexing mentioned twice).

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?

Covers all 7 parameters, output structure, and important notes. Complete given the tool's complexity and presence of output schema.

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%, but description explains each parameter in detail with examples and defaults. Adds meaning beyond schema (e.g., 'Natural language search query', scoping).

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?

Clearly states it performs semantic similarity search over video comments with automatic indexing. Differentiates from sibling tools like semantic_search_transcripts by specifying 'comments'.

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?

Provides when to use (searching comments) and notes scoping behavior with channel_ids/video_ids. Does not explicitly state when not to use, but context with siblings implies it.

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