Skip to main content
Glama

reply_to_comment

Reply to a top-level YouTube comment by providing the comment ID and reply text.

Instructions

Reply to a top-level comment. Requires youtube.force-ssl scope.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
parent_idYesComment ID to reply to (top-level comment.id from list_comments)
textYes

Implementation Reference

  • Handler function for the reply_to_comment tool. Calls client.replyToComment() with parent_id and text, then returns confirmation text.
    server.tool(
      "reply_to_comment",
      "Reply to a top-level comment. Requires youtube.force-ssl scope.",
      replySchema,
      async (args) => {
        await client.replyToComment(args.parent_id, args.text);
        return {
          content: [
            {
              type: "text" as const,
              text: `Reply posted to ${args.parent_id}`,
            },
          ],
        };
      },
  • Zod schema for reply_to_comment inputs: parent_id (string) and text (string, min 1 character).
    const replySchema = {
      parent_id: z
        .string()
        .describe("Comment ID to reply to (top-level comment.id from list_comments)"),
      text: z.string().min(1),
    };
  • Registration of reply_to_comment via server.tool() in registerCommentTools function.
    server.tool(
      "reply_to_comment",
      "Reply to a top-level comment. Requires youtube.force-ssl scope.",
      replySchema,
      async (args) => {
        await client.replyToComment(args.parent_id, args.text);
        return {
          content: [
            {
              type: "text" as const,
              text: `Reply posted to ${args.parent_id}`,
            },
          ],
        };
      },
    );
  • YouTubeClient.replyToComment() helper: posts to the YouTube Data API v3 /comments endpoint with parentId and textOriginal.
    replyToComment(parentId: string, text: string): Promise<unknown> {
      return this.dataPost(
        "/comments",
        { part: "snippet" },
        { snippet: { parentId, textOriginal: text } },
      );
    }
Behavior2/5

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

No annotations provided; description only notes scope requirement. Does not disclose mutation behavior, idempotency, error responses, or return value.

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?

Two compact sentences conveying purpose and requirement with no extraneous content.

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?

No output schema and minimal description; missing details on expected return, error handling, or post-conditions for a write operation.

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

Parameters2/5

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

Schema covers parent_id with clear description, but text param lacks description. Tool description adds no parameter information beyond schema, not compensating for the 50% coverage gap.

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?

Clearly states verb 'reply' and resource 'top-level comment', with scope requirement. Distinguishes from sibling tools like list_comments or moderate_comment.

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?

No guidance on when to use this tool versus alternatives such as moderate_comment or add_to_playlist. Only mentions required OAuth scope.

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/miller-joe/youtube-mcp'

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