ig_hide_comment
Hide or unhide comments on your Instagram posts to manage your content's visibility and maintain your desired engagement environment.
Instructions
Hide or unhide a comment on your post.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| comment_id | Yes | Comment ID | |
| hide | Yes | true to hide, false to unhide |
Implementation Reference
- src/tools/instagram/comments.ts:109-125 (handler)The 'ig_hide_comment' tool is registered and implemented within the registerIgCommentTools function in src/tools/instagram/comments.ts. It uses the MetaClient to send a POST request to update the comment's hidden status.
// ─── ig_hide_comment ───────────────────────────────────────── server.tool( "ig_hide_comment", "Hide or unhide a comment on your post.", { comment_id: z.string().describe("Comment ID"), hide: z.boolean().describe("true to hide, false to unhide"), }, async ({ comment_id, hide }) => { try { const { data, rateLimit } = await client.ig("POST", `/${comment_id}`, { hide }); return { content: [{ type: "text", text: JSON.stringify({ success: true, hidden: hide, ...data as object, _rateLimit: rateLimit }, null, 2) }] }; } catch (error) { return { content: [{ type: "text", text: `Hide comment failed: ${error instanceof Error ? error.message : String(error)}` }], isError: true }; } } );