Skip to main content
Glama

ig_get_mentioned_comments

Retrieve Instagram comments where your account was mentioned to monitor engagement and respond directly from the Meta MCP server.

Instructions

Get comments where the account was @mentioned. Returns the media and comment details.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
comment_idYesComment ID from a mention notification
fieldsNoFields to return (default: id,text,timestamp,username,media)

Implementation Reference

  • The handler function for 'ig_get_mentioned_comments' tool which calls the Instagram API via the MetaClient.
    server.tool(
      "ig_get_mentioned_comments",
      "Get comments where the account was @mentioned. Returns the media and comment details.",
      {
        comment_id: z.string().describe("Comment ID from a mention notification"),
        fields: z.string().optional().describe("Fields to return (default: id,text,timestamp,username,media)"),
      },
      async ({ comment_id, fields }) => {
        try {
          const f = fields || "id,text,timestamp,username,media{id,media_url,media_type}";
          const { data, rateLimit } = await client.ig("GET", `/${client.igUserId}/mentioned_comment`, {
            comment_id,
            fields: f,
          });
          return { content: [{ type: "text", text: JSON.stringify({ ...data as object, _rateLimit: rateLimit }, null, 2) }] };
        } catch (error) {
          return { content: [{ type: "text", text: `Get mentioned comments failed: ${error instanceof Error ? error.message : String(error)}` }], isError: true };
        }
      }
    );
  • The registration function 'registerIgMentionTools' where the 'ig_get_mentioned_comments' tool is added to the McpServer.
    export function registerIgMentionTools(server: McpServer, client: MetaClient): void {

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