Skip to main content
Glama

Where views came from

yt_traffic_sources
Read-onlyIdempotent

Diagnose why a video took off or flatlined by breaking down views and watch time by traffic source—search, suggested, playlists, external, and more. Optionally scope to one video.

Instructions

Break views and watch time down by how viewers arrived: YouTube search, suggested/related video, channel page, playlist, external sites, notifications, subscriptions feed, Shorts feed, end screens, and so on. The single most useful diagnostic for 'why did this take off' or 'why did it flatline'. Optionally scope it to one video. Source names come back as the API's own constants (YT_SEARCH, RELATED_VIDEO, EXT_URL, SHORTS, SUBSCRIBER, PLAYLIST, NOTIFICATION, END_SCREEN, NO_LINK_OTHER, and others).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
metricsNoThe traffic-source report supports only views and estimatedMinutesWatched.
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.
video_idNoOptional: restrict to a single video's traffic instead of the whole channel.
start_dateYesStart date, YYYY-MM-DD, inclusive. Interpreted in the channel's timezone.
Behavior4/5

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

Annotations already declare readOnly, idempotent, and non-destructive hints, so the bar is lower. The description adds value by disclosing that source names are returned as API constants (YT_SEARCH, RELATED_VIDEO, etc.), which informs the agent about the exact output format. No contradiction with 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?

The description is three sentences, tightly packed with useful information: the breakdown dimension, the diagnostic use case, and the output constant names. No filler or redundancy; every sentence earns its place.

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?

Given a 4-parameter tool with no output schema, the description covers the tool's purpose, the meaning of the output constants, and a compelling use case. The schema handles date and video_id details, and annotations cover safety. It does not explicitly describe return structure or pagination, but those are less critical for this read-only diagnostic tool.

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%, so the baseline is 3. The description adds indirect context about the video_id parameter ('Optionally scope it to one video') and mentions the available metrics indirectly, but it does not add detail beyond what the schema already provides for each parameter.

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 uses a specific verb phrase 'Break views and watch time down by how viewers arrived' and lists concrete source examples (YouTube search, suggested video, channel page, etc.). This clearly distinguishes it from sibling tools like yt_top_videos or yt_video_performance, which focus on different dimensions.

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 explicitly states the diagnostic use case: 'The single most useful diagnostic for why did this take off or why did it flatline.' It gives clear context for when to use the tool, though it does not name specific alternative tools or exclusion criteria, which prevents a 5.

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