Skip to main content
Glama
luiso2

Evolution API WhatsApp MCP Server

by luiso2

get_chats

Retrieve all WhatsApp chats for a specified instance to monitor conversations and manage messaging workflows.

Instructions

Get all chats

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
instanceNameYesInstance name

Implementation Reference

  • The main handler function for the 'get_chats' tool. It fetches chats using the EvolutionAPI service for the given instance and returns them as a JSON-formatted text response.
    private async handleGetChats(args: any) {
      const chats = await evolutionAPI.findChats(args.instanceName);
      return {
        content: [
          {
            type: 'text',
            text: JSON.stringify(chats, null, 2)
          }
        ]
      };
    }
  • The input schema definition for the 'get_chats' tool, specifying that it requires an 'instanceName' parameter.
    {
      name: 'get_chats',
      description: 'Get all chats',
      inputSchema: {
        type: 'object',
        properties: {
          instanceName: { type: 'string', description: 'Instance name' }
        },
        required: ['instanceName']
      }
    },
  • src/index.ts:540-541 (registration)
    The switch case that registers and dispatches calls to the 'get_chats' handler within the MCP tool request handler.
    case 'get_chats':
      return await this.handleGetChats(args);
Behavior2/5

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

No annotations are provided, so the description carries the full burden. 'Get all chats' implies a read operation, but it doesn't disclose behavioral traits such as whether this requires authentication, how results are returned (e.g., pagination, format), rate limits, or error conditions. This leaves significant gaps for a tool with no annotation coverage.

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 extremely concise ('Get all chats'), which is efficient for a simple tool. However, it's under-specified rather than appropriately sized—it lacks necessary details for clarity and usage, so it doesn't earn a perfect score.

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

Completeness2/5

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

Given the complexity (a read operation with one parameter) and no annotations or output schema, the description is incomplete. It doesn't explain what 'chats' entails, how results are structured, or any limitations, making it inadequate for an agent to use effectively without additional context.

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, with 'instanceName' clearly documented. The description adds no parameter semantics beyond what the schema provides, so it meets the baseline of 3 where the schema does the heavy lifting.

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

Purpose3/5

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

The description 'Get all chats' clearly states the verb ('Get') and resource ('chats'), but it's vague about scope and doesn't differentiate from sibling tools like 'get_messages' or 'list_contacts'. It doesn't specify what 'all' means in context (e.g., all chats for a user, instance, or globally).

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?

No guidance is provided on when to use this tool versus alternatives like 'get_messages' or 'list_contacts'. The description doesn't mention prerequisites, exclusions, or contextual factors that would help an agent choose appropriately among the many sibling tools.

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/luiso2/mcp-evolution-api'

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