Skip to main content
Glama

get_conversation_messages

Retrieve messages from an Instagram direct message conversation using the conversation ID, with optional limit control for message quantity.

Instructions

Get messages from a specific Instagram DM conversation. Requires instagram_manage_messages permission.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
conversation_idYesInstagram conversation ID
limitNoNumber of messages (max 100)

Implementation Reference

  • The implementation of the get_conversation_messages tool logic in the client.
    async getConversationMessages(
      conversationId: string,
      limit = 25
    ): Promise<IGMessage[]> {
      const fields = "id,from,to,message,created_time,attachments";
      const data = await this.request("GET", conversationId, {
        params: {
          fields: `messages{${fields}}`,
          limit: String(Math.min(limit, 100)),
        },
        useFacebookApi: true,
      });
      return data.messages?.data ?? [];
    }
  • src/index.ts:190-200 (registration)
    The MCP tool registration for get_conversation_messages.
    name: "get_conversation_messages",
    description:
      "Get messages from a specific Instagram DM conversation. Requires instagram_manage_messages permission.",
    inputSchema: {
      type: "object" as const,
      properties: {
        conversation_id: { type: "string", description: "Instagram conversation ID" },
        limit: { type: "integer", description: "Number of messages (max 100)", minimum: 1, maximum: 100, default: 25 },
      },
      required: ["conversation_id"],
    },

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/mcpware/instagram-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server