Skip to main content
Glama
l4b4r4b4b4

YouTube MCP Server

by l4b4r4b4b4

get_live_chat_id

Retrieve the live chat ID for a live YouTube stream using its video ID. Required to fetch chat messages during the broadcast.

Instructions

Get the live chat ID for a currently streaming video.

Retrieves the active live chat ID required for fetching chat messages.
This ID remains constant throughout the stream's duration.
Cached for 5 minutes since chat ID doesn't change during stream.

Args:
    video_id: YouTube video ID of the live stream.

Returns:
    Dictionary with:
    - video_id: YouTube video ID
    - live_chat_id: Active live chat ID
    - is_live: Boolean confirming video is live

Example:
    >>> result = get_live_chat_id("dQw4w9WgXcQ")
    >>> chat_id = result["live_chat_id"]

Note:
    - Costs 1 quota unit per request
    - Cached for 5 minutes in youtube.api namespace
    - Raises error if video is not live or chat disabled
    - Use is_live() first to check if video is broadcasting

Caching Behavior:

  • Parameters that accept reference strings can accept a ref_id from a previous tool call

  • Large results return ref_id + preview; use get_cached_result to paginate

  • All responses include ref_id for future reference

Ref input compatibility: Support depends on the tool's input schema/validation. Some strictly typed parameters may reject string ref_ids before resolution.

Full retrieval: Use get_cached_result(ref_id, full=True) to get the complete value.

Preview Size: server default. Override per-call with get_cached_result(ref_id, max_size=...).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
video_idYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior4/5

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

The description discloses the caching behavior (5-minute cache), quota cost (1 unit), and error conditions (if not live or chat disabled). It also details the return schema. However, the generic caching boilerplate appended at the end is not specific to this tool and may add confusion, but does not contradict the explicit statements.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness2/5

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

The core description for the tool is concise, but the appended generic 'Caching Behavior' and 'Ref input compatibility' sections are largely irrelevant and repetitive, bloating the text. These boilerplate additions obscure the tool-specific information and reduce conciseness.

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

Completeness2/5

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

While the tool-specific parts are complete (purpose, param, output, caching, quota, error handling), the inclusion of generic caching boilerplate that mentions ref_id compatibility and pagination is misleading for this tool, which does not document such behavior. This undermines completeness for the specific tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema only specifies video_id as a string with no description. The description compensates by explaining that video_id is the YouTube video ID of the live stream, and provides an example with a specific ID. This adds necessary meaning beyond the bare 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?

The description clearly states the tool gets the live chat ID for a currently streaming video, and explains it is required for fetching chat messages. It distinguishes from siblings like get_live_chat_messages and is_live by noting the ID's purpose and suggesting to check is_live first.

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 provides clear usage context: it should be used for live streams to obtain the chat ID, and suggests using is_live() first to verify the video is broadcasting. It also notes that it raises an error if the video is not live or chat is disabled, implicitly indicating when not to use.

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/l4b4r4b4b4/yt-api-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server