Skip to main content
Glama
YouTube MCP Server

YouTube MCP Server

Get per-video analytics (OAuth)

get_video_analytics
Read-onlyIdempotent

Retrieve analytics for a single YouTube video across a selected date range, including summary metrics, traffic sources, audience retention, and viewer demographics.

Instructions

Analytics for one video: summary metrics, traffic sources, audience retention curve, and viewer demographics.

Requires OAuth; returns an OAUTH_REQUIRED error with setup steps otherwise.

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": {
      "video_id": "<video_id>"
    },
    "name": "get_video_analytics"
  }
}

Input Schema

NameRequiredDescriptionDefault
daysNoWhen no dates are given: the last N days ending today.
end_dateNoEnd date YYYY-MM-DD, inclusive.
sectionsNoSubset of: summary, traffic_sources, retention, demographics. Omit for all.
video_idYesID of a video on your channel.
start_dateNoStart date YYYY-MM-DD, inclusive. Omit both dates to use `days`.

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, non-destructive, open-world behavior, so the safety profile is covered. The description adds genuinely new context: authentication is required and a missing-credential call returns an OAUTH_REQUIRED error with setup steps, which prevents a wasted call. It does not discuss cost, quotas, or latency, keeping it short of a 5.

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, front-loaded with the payload contents and followed by the authentication constraint; no filler, no restatement of the title.

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?

An output schema exists and the schema fully documents all five parameters, so the description only needs to carry auth and scope, which it does. A brief note on when to omit dates versus sections would make it airtight, but nothing essential for a correct call is missing.

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 the schema itself documents days, start_date/end_date, and the sections subset in more detail than the description. The description adds no syntax, defaults, or interaction rules beyond the structured fields, so the baseline 3 applies.

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?

States a specific verb and resource ('Analytics for one video') and enumerates the returned metric groups (summary, traffic sources, retention, demographics). The 'one video' scoping is enough to separate it from get_channel_analytics or get_video_details without opening either schema.

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

Usage Guidelines3/5

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

The per-video scope implies when to reach for it, and the OAuth prerequisite plus the OAUTH_REQUIRED failure mode are spelled out. However, it never explicitly routes the agent away from get_channel_analytics or toward get_video_details for metadata, so alternative selection is left to inference.

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