Skip to main content
Glama

moderate_comment

Update a YouTube comment's moderation status to held for review, published, or rejected.

Instructions

Change the moderation status of a comment: heldForReview (hide pending approval), published (approve), or rejected (delete).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
comment_idYes
moderation_statusYesheldForReview hides until approved, published approves, rejected deletes.

Implementation Reference

  • YouTubeClient.moderateComment() - Makes a POST request to YouTube's comments/setModerationStatus endpoint with the comment ID and moderation status.
    moderateComment(commentId: string, moderationStatus: "heldForReview" | "published" | "rejected"): Promise<void> {
      const url = new URL(`${DATA_API}/comments/setModerationStatus`);
      url.searchParams.set("id", commentId);
      url.searchParams.set("moderationStatus", moderationStatus);
      return this.request<void>(url.toString(), { method: "POST" });
    }
  • Zod schema defining the input parameters for moderate_comment: comment_id (string) and moderation_status (enum).
    const moderateSchema = {
      comment_id: z.string(),
      moderation_status: z.enum(["heldForReview", "published", "rejected"]).describe(
        "heldForReview hides until approved, published approves, rejected deletes.",
      ),
    };
  • Registration of the 'moderate_comment' tool on the MCP server, with its description, schema, and handler callback.
    server.tool(
      "moderate_comment",
      "Change the moderation status of a comment: heldForReview (hide pending approval), published (approve), or rejected (delete).",
      moderateSchema,
      async (args) => {
        await client.moderateComment(args.comment_id, args.moderation_status);
        return {
          content: [
            {
              type: "text" as const,
              text: `Set moderation status of ${args.comment_id} to ${args.moderation_status}`,
            },
          ],
        };
      },
    );
Behavior3/5

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

The description explains the behavior of each status (hide, approve, delete) but lacks details on side effects (e.g., whether deletion is irreversible, if notifications are sent) and required permissions. No annotations are present, so the description carries the full burden, which it partially meets.

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, front-loaded sentence efficiently conveys the purpose and the three possible statuses with no redundant information. Every word adds value.

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

Completeness3/5

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

Given the tool's moderate complexity (two required parameters, one with enum), the description explains the status effects but omits return value (e.g., success response, error cases) and idempotency. It is adequate but not fully comprehensive.

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?

The input schema has 50% coverage (only 'moderation_status' described). The description adds context to the status parameter beyond the schema's brief description, but 'comment_id' remains undocumented. The description partially compensates for the schema gaps.

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 verb 'Change' and the resource 'moderation status of a comment', with explicit enumeration of the three statuses (heldForReview, published, rejected). This clearly distinguishes it from sibling tools like 'list_comments' or 'reply_to_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 is provided on when to use this tool versus alternatives. For example, it doesn't mention that this tool should be used for moderation actions after listing comments, or prerequisites like requiring specific permissions.

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