Skip to main content
Glama

ig_get_message

Retrieve details of a specific Instagram direct message using its message ID. This tool helps users access message information from the Instagram Graph API.

Instructions

Get details of a specific DM message.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
message_idYesMessage ID

Implementation Reference

  • The handler for 'ig_get_message', which uses the MetaClient to fetch specific message details from the Instagram API.
    server.tool(
      "ig_get_message",
      "Get details of a specific DM message.",
      {
        message_id: z.string().describe("Message ID"),
      },
      async ({ message_id }) => {
        try {
          const { data, rateLimit } = await client.ig("GET", `/${message_id}`, {
            fields: "id,message,from,created_time,attachments",
          });
          return { content: [{ type: "text", text: JSON.stringify({ ...data as object, _rateLimit: rateLimit }, null, 2) }] };
        } catch (error) {
          return { content: [{ type: "text", text: `Get message 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