Skip to main content
Glama
YouTube Playlist MCP

YouTube Playlist MCP

by haktanonur

Search & score YouTube videos

search_videos
Read-only

Search YouTube by topic, filter out Shorts, live, and low-view videos, then score candidates by popularity and engagement to select playlist content.

Instructions

Search YouTube for a topic, collect 10–100 candidate videos, drop Shorts/live/low-view videos and score each 0–100 (popularity incl. views-per-day, like rate, comment rate, optional recency). Read-only. Costs 100 quota units per 50 candidates (+1 per 50 for statistics). Afterwards, review titles/descriptions for relevance and call preview_playlist.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "query": "<query>"
    },
    "name": "search_videos"
  }
}

Input Schema

NameRequiredDescriptionDefault
orderNoOrder YouTube uses to pick candidates.relevance
queryYesWhat to search for, ideally in the target language (e.g. 'Almanca öğrenmek başlangıç').
languageNoISO 639-1 code (e.g. 'tr', 'en', 'de'). Biases search and removes videos whose declared language differs.
min_viewsNo
like_weightNo
region_codeNoISO 3166-1 alpha-2 country (e.g. 'TR').
safe_searchNomoderate
comment_weightNo
include_shortsNo
max_candidatesNoHow many search results to collect (50 per 100 units).
recency_weightNo0 = ignore upload date (default). 0.2–0.4 favours newer videos. Use when the user wants up-to-date content.
max_per_channelNoApplied when building the preview.
published_afterNoISO date, e.g. 2024-01-01. Ignored if published_within_days is set.
published_beforeNoISO date.
popularity_weightNo
max_duration_minutesNo
min_duration_minutesNoe.g. 20 for 'longer than 20 minutes'.
published_within_daysNoOnly videos from the last N days (e.g. 365).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.5/5.0
Behavior5/5

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

Annotations already declare readOnlyHint and openWorldHint, but the description adds substantial behavior the schema cannot express: quota cost of 100 units per 50 candidates plus 1 per 50 for statistics, the automatic dropping of Shorts/live/low-view videos, and the composition of the 0-100 score. These are exactly the operational details an agent needs before spending quota.

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?

Three sentences, front-loaded with the core action and pipeline, then cost, then the required next step. The first sentence is dense but every clause carries information. Minor cost: the filtering and scoring details are crammed into one long clause rather than structured, but nothing is wasted.

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?

For an 18-parameter tool with no output schema, the description covers the operation, filtering, scoring, quota cost, and the mandatory follow-up call to preview_playlist. It does not describe the shape of the returned candidates (fields per video beyond title/description), which is the main remaining gap for an agent parsing results.

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

Parameters4/5

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

Schema coverage is 61%, and the description compensates by explaining what the weight parameters do collectively: popularity including views-per-day, like rate, comment rate, and optional recency. It also ties max_candidates to the quota cost. Several parameters (safe_search, max_per_channel, min_views, duration bounds) still rely solely on the schema, keeping this below a 5.

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?

Names a specific verb and resource (search YouTube for a topic) and then describes the full pipeline: collect 10-100 candidates, filter Shorts/live/low-view, score 0-100. An agent can distinguish this from preview_playlist or list_my_playlists immediately, since those operate on existing playlists while this one discovers and ranks candidates.

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?

Gives a clear workflow: run this search, then review titles/descriptions for relevance and call preview_playlist. Also states a use case for recency_weight ('use when the user wants up-to-date content'). What is missing is an explicit statement of when NOT to use it, e.g. when the user already has a playlist and should call get_playlist_items instead.

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