Skip to main content
Glama

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
NameRequiredDescriptionDefault
comment_idYesComment ID
hideYestrue to hide, false to unhide

Implementation Reference

  • 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 };
        }
      }
    );

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/mikusnuz/meta-mcp'

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