Skip to main content
Glama

moderate_comment

Set a YouTube comment's moderation status to hold for review, approve, or reject to manage its visibility.

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

  • The MCP tool handler for 'moderate_comment'. Invokes client.moderateComment() with comment_id and moderation_status, then returns a success message.
    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}`,
            },
          ],
        };
      },
    );
  • Zod input schema for the moderate_comment tool: requires comment_id (string) and moderation_status (enum: heldForReview, published, rejected).
    const moderateSchema = {
      comment_id: z.string(),
      moderation_status: z.enum(["heldForReview", "published", "rejected"]).describe(
        "heldForReview hides until approved, published approves, rejected deletes.",
      ),
    };
  • YouTubeClient.moderateComment() - makes POST request to YouTube API /comments/setModerationStatus with id and moderationStatus parameters.
    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" });
    }
  • src/server.ts:49-49 (registration)
    Registration - registerCommentTools(s, youtube) is called inside buildServer() to register all comment tools including moderate_comment.
    registerCommentTools(s, youtube);
Behavior3/5

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

No annotations are provided, so the description carries full burden. It discloses the effects of each status (hides, approves, deletes) but does not mention required permissions, reversibility, or side effects. This is adequate but not comprehensive.

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?

The description is a single sentence that efficiently conveys the tool's purpose and the three possible statuses. It is front-loaded with the action and resource, with no extraneous words.

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 simple mutation tool with 2 parameters and no output schema, the description covers the core functionality. It explains the purpose, the status options, and their effects. It could mention success/error behavior or authentication needs, but it is fairly complete given the tool's simplicity.

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?

The description adds meaning to the 'moderation_status' parameter by explaining the result of each enum value, which goes beyond the schema's brief enum description. However, it does not clarify 'comment_id', which is a simple identifier and may be self-explanatory.

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 'Change the moderation status of a comment' with explicit enumeration of the three possible statuses and their effects. It distinguishes the tool from sibling tools like list_comments or reply_to_comment by focusing solely on moderation actions.

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?

The description implies usage for moderating a comment but provides no explicit guidance on when to use this tool versus alternatives, nor does it mention prerequisites or exclusions. The purpose is clear from context, but the description lacks explicit when/when-not instructions.

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