Skip to main content
Glama

get_conversations

Retrieve conversation lists and participant information from Instagram or Facebook inboxes to manage messaging interactions.

Instructions

Get list of conversations/inbox for Instagram or Facebook. Returns conversation IDs and participant info.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
platformYesPlatform to get conversations from
folderNoInbox folder (default: inbox)

Implementation Reference

  • MCP server handler for the 'get_conversations' tool: parses arguments using the schema and delegates to the Facebook API function.
    case 'get_conversations': {
      const params = GetConversationsSchema.parse(args);
      result = await api.getConversations(params.platform, params.folder);
      break;
    }
  • Core implementation that makes the Graph API call to fetch conversations for the specified platform and folder.
    export async function getConversations(
      platform: 'instagram' | 'facebook',
      folder: 'inbox' | 'other' = 'inbox'
    ): Promise<{ data: Conversation[] }> {
      const platformParam = platform === 'instagram' ? 'INSTAGRAM' : 'MESSENGER';
    
      return makeApiCall({
        endpoint: `/${config.fbPageId}/conversations`,
        params: {
          platform: platformParam,
          folder,
          fields: 'id,can_reply,message_count,participants'
        }
      });
    }
  • Zod schema for validating input parameters to the get_conversations tool.
    const GetConversationsSchema = z.object({
      platform: z.enum(['instagram', 'facebook']),
      folder: z.enum(['inbox', 'other']).optional()
    });
  • src/index.ts:136-146 (registration)
    Tool registration in the MCP server's listTools handler, defining name, description, and input schema.
      name: 'get_conversations',
      description: 'Get list of conversations/inbox for Instagram or Facebook. Returns conversation IDs and participant info.',
      inputSchema: {
        type: 'object',
        properties: {
          platform: { type: 'string', enum: ['instagram', 'facebook'], description: 'Platform to get conversations from' },
          folder: { type: 'string', enum: ['inbox', 'other'], description: 'Inbox folder (default: inbox)' }
        },
        required: ['platform']
      }
    },
  • TypeScript interface defining the structure of a conversation object returned by the tool.
    export interface Conversation {
      id: string;
      can_reply?: boolean;
      message_count?: number;
      participants?: { data: Array<{ id: string; name?: string; username?: string }> };
    }
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It states the tool returns 'conversation IDs and participant info,' which is helpful, but lacks details on permissions, rate limits, pagination, error handling, or whether it's read-only. For a tool with zero annotation coverage, this leaves significant gaps in understanding its operational behavior.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is concise and front-loaded, consisting of a single sentence that directly states the tool's purpose and return value. There is no unnecessary verbiage, and it efficiently communicates core information. However, it could be slightly more structured by separating usage notes from the main purpose.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's moderate complexity (2 parameters, no output schema, no annotations), the description is adequate but incomplete. It covers the basic purpose and return data, but lacks details on behavioral traits, error cases, and differentiation from siblings. Without annotations or an output schema, more context would improve completeness for effective agent use.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 100% description coverage, clearly documenting both parameters ('platform' and 'folder') with enums and defaults. The description adds no additional semantic context beyond what the schema provides, such as explaining folder differences or platform-specific nuances. Given the high schema coverage, the baseline score of 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: 'Get list of conversations/inbox for Instagram or Facebook.' It specifies the verb ('Get'), resource ('conversations/inbox'), and target platforms. However, it doesn't explicitly differentiate from sibling tools like 'get_conversation_by_user' or 'get_conversation_messages', which reduces it from a perfect score.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides minimal guidance on when to use this tool. It mentions the platforms (Instagram/Facebook) and folder types, but offers no explicit advice on when to choose this over alternatives like 'get_conversation_by_user' or 'get_conversation_messages', nor does it specify prerequisites or exclusions. This leaves usage context largely implied.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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

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