Skip to main content
Glama

avg_duration

Calculate the mean duration of a YouTube channel's most recent uploads to assess typical video length and support channel comparison or filtering.

Instructions

Mean duration of the last N uploads. New tool.

Layer: Data API. Quota: 2 units for N ≤ 50 (1 playlist page + 1 videos batch).

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": {
      "channel_id": "<channel_id>"
    },
    "name": "avg_duration"
  }
}

Input Schema

NameRequiredDescriptionDefault
channel_idYes
sample_sizeNo

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.2/5.0
Behavior3/5

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

With no annotations, the description carries the full burden, and it does add real behavioral value by disclosing the quota cost model (2 units, one playlist page plus one videos batch). It omits, however, permission/scope requirements, error behavior, and how cost scales beyond N=50.

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 lines, metric stated up front and quota detail secondary, with no filler prose. The '**New tool.**' marker and trailing whitespace add no information and slightly dilute an otherwise tight definition.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

An output schema exists, so return-value explanation is not required. Still, for a data-query tool with an undocumented required identifier argument, the definition leaves out enough (channel_id format, duration units, behavior for channels with fewer than N uploads) that an agent could call it incorrectly.

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 coverage is 0%, so the description must compensate. It usefully ties 'N' to the sample_size parameter and implies a cost breakpoint at 50, but it never explains the required channel_id format (ID vs handle vs URL) or the unit of 'duration'.

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?

States a specific metric and resource: mean duration of the last N uploads, which is unmistakable and distinct from sibling search/list tools like search_videos and max_views_in_channel. It doesn't explicitly contrast itself with those siblings, so it falls short of 5.

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

Usage Guidelines2/5

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

The description says nothing about when to pick this over max_views_in_channel or get_first_published_date, nor any preconditions. The only guidance is a quota note and the label '**New tool.**', which does not help an agent choose.

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