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
| Name | Required | Description | Default |
|---|---|---|---|
| message_id | Yes | Message ID |
Implementation Reference
- src/tools/instagram/messaging.ts:79-95 (handler)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 }; } } );