Skip to main content
Glama

Get channel analytics

get_channel_analytics
Read-onlyIdempotent

Retrieve watch time, average view duration, retention, traffic sources, and subscriber changes for a connected YouTube channel via OAuth, with date-range and metric filters.

Instructions

Watch time, average view duration, retention percentage, traffic sources and subscriber change for a connected channel. There is no API-key path to this data: it needs OAuth on the channel that owns it, and it exists for no one else's channel. Data lags roughly two days behind real time.

Input Schema

NameRequiredDescriptionDefault
sortNoe.g. `-views` for descending
accountNoWhich connected channel to act on (name or @handle). Required when more than one is connected: without it the call fails and lists the choices rather than picking one.
filtersNoe.g. `video==VIDEO_ID` or `country==US`
metricsNoComma-separated. Default: views,estimatedMinutesWatched,averageViewDuration,averageViewPercentage,subscribersGained,subscribersLost
end_dateYesYYYY-MM-DD
dimensionsNoe.g. `day`, `video`, `country`, `insightTrafficSourceType`
start_dateYesYYYY-MM-DD
max_resultsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv3.0.2
    • removedInput schema / $schema
      Removed value: -"http://json-schema.org/draft-07/schema#"
    • removedInput schema / additionalProperties
      Removed value: -false
  2. First observedv1.0.0

TDQS

A4.1/5.0
Behavior5/5

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

Annotations already cover the safety profile (readOnlyHint, idempotentHint, destructiveHint=false), yet the description adds genuinely new operational context: an OAuth-only access path, the ownership constraint, and a ~2-day data lag. That freshness caveat is exactly the kind of behavior an agent must know before trusting the numbers.

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 tight sentences: the first front-loads what you get, the next two cover access constraints and freshness. No repetition of the schema, no filler.

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 8-parameter read tool with no output schema, the description covers payload contents, auth requirements, and data latency, which is most of what an agent needs. Minor gaps remain around pagination (max_results) and the multi-account disambiguation behavior, though the schema handles the latter.

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 88%, so the schema already documents sort, account, filters, metrics, dimensions, and date formats in detail. The description contributes nothing parameter-specific, so the baseline 3 applies — no penalty, but no added value either.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description names the concrete resource (a connected channel's analytics) and enumerates the specific metrics returned — watch time, average view duration, retention, traffic sources, subscriber change — so an agent knows exactly what data this yields. It does not explicitly differentiate itself from siblings like analyze_channel or get_channel, which keeps it short of a 5.

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?

It gives a hard precondition (OAuth on the channel that owns the data, no API-key path) and an explicit exclusion (it exists for no one else's channel), which tells the agent when this tool is even callable. It stops short of routing to an alternative sibling for other channels' data, so 4 rather than 5.

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