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
| Name | Required | Description | Default |
|---|---|---|---|
| comment_id | Yes | Comment ID |
Implementation Reference
- src/tools/instagram/comments.ts:30-47 (handler)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 }; } } );