Skip to main content
Glama

Extract YouTube Comments

extract_youtube_comments
Read-only

Extract comments from YouTube videos with pagination, reply inclusion, and optional JSON export to disk while returning slim metadata.

Instructions

Extract YouTube video comments. Supports pagination via comment_offset. Use output_path to persist the full unsliced comment list to disk as JSON; the response is then slimmed to metadata only.

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": {
      "url": "<url>"
    },
    "name": "extract_youtube_comments"
  }
}

Input Schema

NameRequiredDescriptionDefault
urlYesYouTube video URL
sort_byNo'popular'|'recent'popular
overwriteNoOverwrite an existing output file at output_path. Defaults to False.
output_pathNoAbsolute file path (auto .json extension) to persist the full unsliced/untruncated comment list. When set, the complete comment array is written to disk BEFORE the internal token-limit reduction, and the response is slimmed (extracted_data.comments removed but comment_count etc. kept).
max_commentsNoMax comments to retrieve (1-1000)
content_limitNoMax characters to return (0=unlimited)
comment_offsetNoNumber of comments to skip (for pagination)
content_offsetNoStart position for content (0-indexed)
include_repliesNoInclude reply comments
include_content_in_responseNoWhen True (with output_path set), keep the comment list in the response too. Note: the response copy is still subject to content_limit/content_offset slicing and the token-limit comment-array reduction; only the on-disk file holds the full list. Defaults to False.

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.5.0
    • addedInput schema / additionalProperties
      Added value: +false
  2. Addedv0.3.2

TDQS

A3.7/5.0
Behavior4/5

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

Annotations only declare readOnlyHint=true, so the description earns credit for disclosing the non-obvious side effect: setting output_path writes the full unsliced list to disk before token-limit reduction and slims the response to metadata. That is real behavior an agent would otherwise discover only by trial.

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?

Three compact sentences with the core action front-loaded and the disk-persistence caveat placed after it. No filler, though the output_path sentence partially duplicates schema text that could have been used for a sibling comparison instead.

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 a 10-parameter read tool with a full schema and an output schema, the description covers the two behaviors that matter most: pagination and on-disk persistence versus a slimmed response. The gap is the absence of any routing hint among the several sibling extraction tools.

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 the schema already explains output_path, comment_offset, and the slicing interplay in equal or greater detail. The description restates rather than extends that meaning, which is the baseline case.

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 verb and resource ('Extract YouTube video comments'), which is unambiguous and naturally separates it from the neighbouring transcript tools. It stops short of naming any sibling or explicitly contrasting scope, so it lands just below 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 Guidelines3/5

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

Usage is only implied: 'Supports pagination via comment_offset' hints at incremental retrieval, and the output_path sentence suggests when persisting is desirable. There is no explicit when-to-use/when-not guidance and no mention of alternatives among the many sibling extraction tools.

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