Skip to main content
Glama

Top videos by a metric

yt_top_videos
Read-onlyIdempotent

Rank a channel's videos by views, watch time, or other metrics over a date range to find top performers. Returns video IDs and optionally titles for retention, traffic, and episode analysis.

Instructions

Rank the channel's videos over a date range by views, watch time, average view duration, or subscribers gained. Use this to find which videos to look at more closely — the IDs it returns feed yt_audience_retention, yt_traffic_sources, and yt_episode_race. max_results is capped at 200 by the API. Setting resolve_titles=true spends 1 YouTube Data API quota unit per 50 videos (default daily budget: 10,000 units); the Analytics query itself does not draw on that budget. Pass resolve_titles=false to return bare video IDs and spend none.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
metricsNoMetrics to return per video.
sort_byNoMetric to rank by, highest first.views
end_dateYesEnd date, YYYY-MM-DD, inclusive. YouTube Analytics lags roughly 2-3 days, so ending the range at today usually returns zeros for the last few days.
start_dateYesStart date, YYYY-MM-DD, inclusive. Interpreted in the channel's timezone.
max_resultsNoHow many videos to return, 1-200. Keep it low; rows cost tokens.
resolve_titlesNoLook up each video's title so the result is readable. Setting resolve_titles=true spends 1 YouTube Data API quota unit per 50 videos (default daily budget: 10,000 units); the Analytics query itself does not draw on that budget. Pass resolve_titles=false to return bare video IDs and spend none.
Behavior5/5

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

Annotations already declare readOnlyHint, idempotentHint, and non-destructive. The description adds concrete behavioral details: max_results cap, resolve_titles quota cost per 50 videos, no quota for analytics query, and behavior when false. This goes beyond annotations.

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?

Three sentences, front-loaded with purpose and downstream usage. Each sentence adds distinct information: ranking criteria, downstream integration, and quota/cap details. No redundancy.

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?

The tool has no output schema, so the description carries responsibility for return values. It indicates the result includes video IDs and implies metric values, but doesn't specify the exact response structure. Given the simple nature and sibling context, it's adequately complete, though a bit more on return format would be ideal.

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 covers 100% of parameters with descriptions, including defaults and enums. The description reinforces max_results cap and resolve_titles cost but adds little new semantic detail beyond the schema. Baseline 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 states 'Rank the channel's videos over a date range by views, watch time, average view duration, or subscribers gained.' This is a specific verb and resource, and it distinguishes from sibling tools by noting the returned IDs feed other tools.

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?

Explicitly says 'Use this to find which videos to look at more closely' and names downstream tools. However, it doesn't provide exclusions or compare with sibling tools like yt_video_performance, so it's clear context but not full when-not guidance.

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/conorbronsdon/yt-analytics-mcp'

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