ig_post_comment
Add a comment to Instagram posts using the Meta MCP server. Specify media ID and message to post top-level comments.
Instructions
Post a top-level comment on a media post.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| media_id | Yes | Media ID to comment on | |
| message | Yes | Comment text |
Implementation Reference
- src/tools/instagram/comments.ts:50-65 (handler)The `ig_post_comment` tool implementation, including schema definition and request handler logic.
server.tool( "ig_post_comment", "Post a top-level comment on a media post.", { media_id: z.string().describe("Media ID to comment on"), message: z.string().describe("Comment text"), }, async ({ media_id, message }) => { try { const { data, rateLimit } = await client.ig("POST", `/${media_id}/comments`, { message }); return { content: [{ type: "text", text: JSON.stringify({ ...data as object, _rateLimit: rateLimit }, null, 2) }] }; } catch (error) { return { content: [{ type: "text", text: `Post comment failed: ${error instanceof Error ? error.message : String(error)}` }], isError: true }; } } );