Skip to main content
Glama

reply_to_comment

Respond to Instagram comments directly by providing a comment ID and reply message. This tool enables engagement with your audience on specific posts.

Instructions

Reply to a specific comment on an Instagram post. Requires instagram_manage_comments permission.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
comment_idYesComment ID to reply to
messageYesReply text (max 2200 characters)

Implementation Reference

  • The `replyToComment` function in `InstagramClient` sends a POST request to the API to reply to a specific comment.
    async replyToComment(
      commentId: string,
      message: string
    ): Promise<IGComment> {
      const data = await this.request("POST", `${commentId}/replies`, {
        body: { message },
      });
      return { id: data.id, text: message };
    }
  • src/index.ts:242-254 (registration)
    The `reply_to_comment` tool is registered in the tool list with its schema and description.
    {
      name: "reply_to_comment",
      description:
        "Reply to a specific comment on an Instagram post. Requires instagram_manage_comments permission.",
      inputSchema: {
        type: "object" as const,
        properties: {
          comment_id: { type: "string", description: "Comment ID to reply to" },
          message: { type: "string", description: "Reply text (max 2200 characters)", maxLength: 2200 },
        },
        required: ["comment_id", "message"],
      },
    },
  • The `handleTool` function invokes `c.replyToComment` when the `reply_to_comment` tool is called.
    case "reply_to_comment": {
      const reply = await c.replyToComment(args.comment_id, args.message);
      return JSON.stringify(reply, null, 2);
    }

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/mcpware/instagram-mcp'

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