Skip to main content
Glama

ig_get_comment

Retrieve details for a specific Instagram comment using its ID through the Meta Graph API.

Instructions

Get details of a specific comment.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
comment_idYesComment ID

Implementation Reference

  • The `ig_get_comment` tool implementation, including its registration, schema definition, and handler logic.
    // ─── ig_get_comment ──────────────────────────────────────────
    server.tool(
      "ig_get_comment",
      "Get details of a specific comment.",
      {
        comment_id: z.string().describe("Comment ID"),
      },
      async ({ comment_id }) => {
        try {
          const { data, rateLimit } = await client.ig("GET", `/${comment_id}`, {
            fields: "id,text,username,timestamp,like_count,parent_id,media",
          });
          return { content: [{ type: "text", text: JSON.stringify({ ...data as object, _rateLimit: rateLimit }, null, 2) }] };
        } catch (error) {
          return { content: [{ type: "text", text: `Get 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