list_instances
Retrieve all active WhatsApp Business instances to manage messaging accounts, monitor connection status, and organize communication channels.
Instructions
List all WhatsApp instances
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "list_instances"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/index.ts:584-594 (handler)The handler function for the 'list_instances' tool. It fetches the list of WhatsApp instances from the EvolutionAPI service and returns them as a JSON-formatted text content block.
private async handleListInstances() { const instances = await evolutionAPI.fetchInstances(); return { content: [ { type: 'text', text: JSON.stringify(instances, null, 2) } ] }; } - src/index.ts:56-63 (registration)The tool registration definition including name, description, and empty input schema (no parameters required). This is part of the tools array registered with the MCP server.
{ name: 'list_instances', description: 'List all WhatsApp instances', inputSchema: { type: 'object', properties: {} } }, - src/index.ts:59-62 (schema)The input schema for the 'list_instances' tool, which requires no parameters.
inputSchema: { type: 'object', properties: {} } - src/services/evolution-api.ts:39-42 (helper)Supporting helper method in EvolutionAPI service that performs the actual HTTP GET request to the Evolution API endpoint '/instance/fetchInstances' to retrieve the list of instances.
async fetchInstances(): Promise<Instance[]> { const response = await this.client.get('/instance/fetchInstances'); return response.data; }