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
| Name | Required | Description | Default |
|---|---|---|---|
| comment_id | Yes | Comment ID to reply to | |
| message | Yes | Reply text (max 2200 characters) |
Implementation Reference
- src/client.ts:487-495 (handler)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"], }, }, - src/index.ts:432-435 (handler)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); }