Skip to main content
Glama

SocialDataX YouTube MCP

youtube_search_videos

Read-only

按搜索词搜索 YouTube 公开视频,只返回视频结果。用户需要按搜索词查找视频时使用;已有视频、Shorts 或 youtu.be 链接时使用视频详情或评论工具;已有频道主页链接时使用频道资料或频道发布视频工具;不支持播放列表链接作为搜索输入;支持筛选和 page_token 翻页。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
keywordYesYouTube 视频搜索词,可传关键词或短语,例如品牌名、话题、人物名或内容需求;不要传 YouTube 视频链接、Shorts 链接、频道链接、播放列表链接、video_id 或 page_token。
sort_typeNo排序方式:general=相关性,time_descending=最新上传,view_count_descending=观看次数最多,rating=评分较高。如无明确排序需求,保持 general。general
page_tokenNoYouTube 搜索分页令牌。首次请求留空。继续翻页时必须将上一页返回的完整 next_page_token 原样作为 page_token 传回;page_token 是不透明分页令牌;不得修改、截断、缩写、脱敏、掩码、省略、规范化、重组或自行生成,不得用省略号替换中间内容。只能用于同一关键词、排序和筛选链路;更换关键词、排序、视频类型、发布时间或时长筛选时,请清空 page_token 后从第一页重新搜索。
video_typeNo视频类型筛选:all=不限类型,video=普通视频,movie=电影。all 会保留视频类搜索结果,输出项用 video_type 标记可明确识别的类型。可明确识别的 Shorts 会标为 short,其余视频结果标为 video。当前不支持 channel、short 或 playlist 作为筛选项;频道信息只作为视频作者信息返回。movie 是筛选条件,返回项使用同一搜索结果字段,并以 video_type=movie 标记。如无明确类型需求,保持 all。all
duration_rangeNo视频时长筛选:all=不限,under_4_min=4 分钟以内,between_4_and_20_min=4 到 20 分钟,over_20_min=20 分钟以上。只对视频类搜索结果有意义;如无明确时长需求,保持 all。all
publish_time_rangeNo发布时间筛选:all=不限,last_hour=过去 1 小时,today=今天,this_week=本周,this_month=本月,this_year=今年。如无明确发布时间需求,保持 all。all

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
itemsYes当前页 YouTube 搜索结果列表;当前页可能为空,是否可继续翻页以 next_page_token 是否为空为准。
pointsYes本次成功调用的积分消耗与调用完成时的账户积分余额。
next_page_tokenYes下一页不透明分页令牌;为空表示没有更多结果。继续翻页时必须将返回的完整 next_page_token 原样作为 page_token 传回;只用于当前 YouTube 搜索续页;不得修改、截断、缩写、脱敏、掩码、省略、规范化、重组或自行生成。

TDQS

A4.5/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true and openWorldHint=true, so the safety profile is covered. The description adds context: it mentions 'only returns video results', filtering support, page_token pagination, and the exclusion of playlist links. These behavioral traits go beyond the annotations and are useful for the agent. Since annotations cover the base safety, a 4 is appropriate—it adds meaningful context without needing to repeat the read-only property.

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?

Two sentences, purpose first, then usage guidance and limitations. No redundant phrasing, each clause earns its place. The description is front-loaded with the core action and scope, and the usage guidance follows naturally. It is concise without sacrificing substance.

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 tool has 6 parameters, one required, 100% schema coverage, and an output schema, the description covers everything an agent needs: when to use, when not, pagination behavior, and limitations (playlist links). The output schema handles return structure, so nothing is missing. The description is complete for correct invocation and routing.

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 each parameter (keyword, sort_type, page_token, video_type, duration_range, publish_time_range) has detailed descriptions in the schema, including enums, defaults, and explicit instructions (e.g., not to modify page_token, what not to pass as keyword). The overall description adds no extra parameter-specific meaning beyond what the schema already provides. With coverage at 100%, the baseline of 3 is appropriate; the description does not need to compensate.

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 the verb 'search', the resource 'YouTube public videos', and the scope 'only returns video results'. It distinguishes itself from video detail, comment, and channel tools by explicitly listing what to use when the user already has a link or channel. This is unambiguous and separates it from siblings.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Provides explicit when-to-use: 'when the user needs to find videos by search term'. It gives exclusions: 'if the user already has a video, Shorts, or youtu.be link, use video detail/comment tools; if they have a channel homepage link, use channel profile/posted videos tools'. It also states playlist links are not supported as search input. This is thorough routing that needs no inference.

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.

TDQS

A4/5.0
Disambiguation4/5

Most tools target clearly distinct resources and actions: points, channel info, channel videos, video detail, comments, replies, search, and speech-text jobs. The two submit speech-text tools (by URL vs by video ID) are similar but differentiated by input type, so they are not truly ambiguous.

Naming Consistency5/5

Tool names consistently follow a snake_case verb_object_by_input pattern, with a service prefix. Even longer names like youtube_get_user_posted_videos_by_channel_url are predictable and parallel to other URL-based getters.

Tool Count5/5

Ten tools is a well-scoped size for a YouTube data access server. Each tool covers a distinct operation or async workflow step without feeling bloated or sparse.

Completeness4/5

The set covers the core YouTube read workflows well: channel info, channel videos, video details, search, comments, replies, and async speech-text extraction. Minor gaps exist, such as no direct tool for fetching all replies without a reply_token and no explicit channel info by video ID, but the provided flow works around these.

Resources