Skip to main content
Glama
YouTubeMCP
by imrees

Get video analytics

get_video_analytics
Read-onlyIdempotent

Retrieve YouTube video analytics—views, watch time, average view duration, engagement, traffic sources, and retention—using presets or custom dates.

Instructions

Analytics for one video: views, watch time, average view duration, engagement, traffic sources and audience retention. Optional feature: needs analytics authorization.

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
presetNo'last_7_days', 'last_28_days' (default) or 'last_90_days'. Ignored if dates are given.last_28_days
end_dateNoCustom end date YYYY-MM-DD (Pacific Time).
video_idYesYouTube video ID (11 characters) or any youtube.com / youtu.be URL.
start_dateNoCustom start date YYYY-MM-DD (Pacific Time).
include_dailyNoAdd a per-day breakdown.
include_retentionNoAdd the audience retention curve.
include_traffic_sourcesNoAdd views by traffic source.

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A3.9/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, non-destructive and open-world behavior, so the safety profile is covered. The description adds a non-obvious behavioral fact beyond annotations: the tool requires analytics authorization and is an 'optional feature', which tells the agent to expect permission failures. It does not discuss rate limits or partial-data behavior, keeping it below 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.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two short sentences with the core resource and metric list front-loaded and the prerequisite appended. The 'Optional feature:' fragment is slightly terse/ambiguous in phrasing but wastes no space.

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?

With an output schema present and full schema parameter documentation, the description need not explain return values, and annotations cover safety. It adds the auth prerequisite, which is the key non-structured fact; only minor gaps remain (e.g., what happens if authorization 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%, so preset/date/flag semantics are fully documented in the schema and the baseline is 3. The description only loosely maps to the include_retention and include_traffic_sources flags by naming those data categories; it adds no date-window or precedence guidance beyond the schema.

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 resource ('one video') and enumerates the metrics returned (views, watch time, average view duration, engagement, traffic sources, audience retention). 'One video' also implicitly separates it from the sibling get_channel_analytics, so an agent can pick correctly without opening the 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?

States a real prerequisite ('needs analytics authorization'), which is useful activation guidance, but gives no explicit when-to-use versus get_channel_analytics or get_top_videos, and no exclusions. Usage is only implied by the scope of the resource.

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