Skip to main content
Glama

youtube_comments: GET /

hasdata_youtube_comments_getYoutubeComments
Read-only

Get YouTube Comments

Returns a page of top-level comments on a YouTube video or short. sortBy=top is YouTube's Top ranking, which varies between viewers and over time; newest is stable. The pinned comment (pinned: true) stays first in both. Replies are fetched separately: pass a comment's replies.nextPageToken as nextPageToken to get that thread's replies (one level deep, paginated on their own). threadAvailable: false means the comment was deleted or its replies are hidden, and the shown reply count can exceed the replies returned. Tokens are self-contained and keep their sortBy, so v and sortBy can be omitted with them. Use for sentiment, feedback or moderation analysis, or to build comment datasets.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "hasdata_youtube_comments_getYoutubeComments"
  }
}

Input Schema

NameRequiredDescriptionDefault
vNo11-character YouTube video ID — the value of the `v=` query parameter in a watch URL (e.g. `dQw4w9WgXcQ` for `https://www.youtube.com/watch?v=dQw4w9WgXcQ`). Required for the first page; omit it on continuation requests that pass `nextPageToken`.
glNoThe two-letter country code for the country you want to limit the search to. Provide one exact documented value (245 allowed), e.g. `ac`, `af`.
hlNoThe two-letter language code for the language you want to use for the search. Provide one exact documented value (159 allowed), e.g. `af`, `ak`.
sortByNoComment order, `top` (YouTube's Top comments) or `newest`.
deviceTypeNoDevice type for the request.
nextPageTokenNoNext-page token from `pagination.nextPageToken`, or a comment's `replies.nextPageToken` to fetch its replies.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • changedInput schema / properties / nextPageToken / description
      Previous value: -"Token to fetch the next page of comments. Pass the `nextPageToken` from a previous response; omit it for the first page."New value: +"Next-page token from `pagination.nextPageToken`, or a comment's `replies.nextPageToken` to fetch its replies."
    • addedInput schema / properties / sortBy
      Added value: +{
      +  "description": "Comment order, `top` (YouTube's Top comments) or `newest`.",
      +  "enum": [
      +    "top",
      +    "newest"
      +  ],
      +  "type": "string"
      +}
  2. Added

TDQS

A4.6/5.0
Behavior5/5

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

Annotations already declare a safe read, and the description goes well beyond them: it discloses that `top` ranking varies between viewers and over time while `newest` is stable, that pinned comments are always first, that replies are one level deep and paginated separately, that `threadAvailable: false` signals deletion or hidden replies, and that the displayed reply count may exceed what is returned. These are exactly the caveats an agent needs to interpret results correctly.

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?

Front-loaded with the purpose and the top-level scope, then progressively denser edge-case detail. Every sentence carries information, though the middle section packs many caveats (pinned, replies, threadAvailable, token self-containment) into a long run of clauses that could be broken up for faster scanning.

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

Completeness5/5

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

There is no output schema, yet the description still explains the relevant return semantics the agent must act on — pinned placement, threadAvailable meaning, and the token paths used for continuation. Combined with full schema coverage, nothing needed to invoke the tool or interpret a page of results is missing.

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?

Schema coverage is 100%, so baseline is 3; the description adds real meaning on top by explaining the behavioral difference between the two sortBy values and the dual role of nextPageToken (pagination token vs. a comment's replies token), plus the conditional requirement of `v`. It does not add anything about gl/hl/deviceType, leaving those entirely to 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?

States a specific verb and resource ('Get YouTube Comments ... returns a page of top-level comments on a YouTube video or short') and immediately scopes it to top-level comments, ruling out the sibling comment tools for other platforms and clarifying that this is not a replies endpoint. An agent can distinguish it from the transcript/video/search YouTube siblings without opening any schema.

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?

Gives explicit contexts ('sentiment, feedback or moderation analysis, or to build comment datasets') and explains the continuation procedure for both pagination and reply threads, including that v and sortBy can be omitted with a token. It stops short of naming a concrete alternative tool for related needs (e.g., video metadata or transcripts), so the when-not guidance is implied rather than explicit.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.