Skip to main content
Glama

yt_post_comment

Publishes a public top-level comment on a YouTube video or Short via YouTube Data API v3 and returns the comment ID, video ID, and published text.

Instructions

Post a public top-level comment thread on a YouTube video or Short via YouTube Data API v3 (commentThreads.insert, costs ~50 daily quota units). Requires OAuth2 with youtube.force-ssl scope. Non-idempotent: each call publishes a new visible comment immediately under the authenticated channel identity and returns {commentId, videoId, text}. Fails if comments are disabled on the target video or the video is private. Built-in limits (not adjustable): at most 20 comments+replies per rolling hour and 100 per rolling 24 hours, and the same text at most 2 times per 24 hours.

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>",
      "text": "<text>"
    },
    "name": "yt_post_comment"
  }
}

Input Schema

NameRequiredDescriptionDefault
textYesPlain-text comment body (1–10,000 characters) to publish publicly on the video.
dry_runNoIf true, post nothing and return the comment text that would be published.
video_idYes11-character YouTube video ID where the top-level comment will be posted.

Output Schema

NameRequiredDescriptionDefault
textNo
videoIdYes
commentIdNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.10.0
    • changedOutput schema / required
      Previous value: -[
      -  "commentId",
      -  "videoId"
      -]New value: +[
      +  "videoId"
      +]
  2. Changed1 schema field changedv0.6.0
    • addedInput schema / properties / dry_run
      Added value: +{
      +  "default": false,
      +  "description": "If true, post nothing and return the comment text that would be published.",
      +  "type": "boolean"
      +}
  3. Changed6 schema fields changedv0.2.0
    • changedInput schema / properties / text / description
      Previous value: -"Comment text to post."New value: +"Plain-text comment body (1–10,000 characters) to publish publicly on the video."
    • addedInput schema / properties / text / maxLength
      Added value: +10000
    • addedInput schema / properties / text / minLength
      Added value: +1
    • changedInput schema / properties / video_id / description
      Previous value: -"11-character YouTube video ID."New value: +"11-character YouTube video ID where the top-level comment will be posted."
    • addedInput schema / properties / video_id / pattern
      Added value: +"^[A-Za-z0-9_-]{11}$"
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "properties": {
      +    "commentId": {
      +      "type": "string"
      +    },
      +    "text": {
      +      "type": "string"
      +    },
      +    "videoId": {
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "commentId",
      +    "videoId"
      +  ],
      +  "type": "object"
      +}
  4. First observedv0.1.0

TDQS

A4.5/5.0
Behavior5/5

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

Goes well beyond the annotations by disclosing quota cost (~50 units), the exact OAuth scope, why it is non-idempotent (each call publishes a new visible comment under the authenticated channel identity), the response shape, and hard per-hour/per-day/same-text rate limits. The failure modes for disabled comments and private videos are behavior the annotations cannot express.

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

Conciseness5/5

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

A single dense paragraph that front-loads purpose, then requirements, behavior, return shape, failure modes, and limits. Each sentence carries distinct information with no restatement of the name or title.

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?

For a non-idempotent, quota-consuming write with an output schema, the definition covers auth, cost, idempotency, failure modes, and rate limits. Nothing an agent needs to decide whether and how to call it 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 video_id, text, and dry_run are already fully documented with patterns and length bounds. The description adds only indirect context (comment is published under the authenticated channel identity) and says nothing specific about dry_run, so it does not meaningfully extend 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 ('Post a public top-level comment thread on a YouTube video or Short') plus the underlying API method (commentThreads.insert). The word 'top-level' distinguishes it from yt_reply_comment without needing to open either 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 clear preconditions and failure conditions: requires OAuth2 with youtube.force-ssl, fails if comments are disabled or the video is private. It does not explicitly name yt_reply_comment as the alternative for threaded replies, so routing is implied rather than stated.

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