Skip to main content
Glama
luiso2

Evolution API WhatsApp MCP Server

by luiso2

send_buttons

Send interactive WhatsApp messages with customizable buttons to recipients, enabling quick responses for business communications and customer engagement.

Instructions

Send message with buttons

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
buttonsYesArray of buttons
descriptionNoMessage description
footerNoMessage footer
instanceNameYesInstance name
numberYesRecipient phone number
titleNoMessage title

Implementation Reference

  • src/index.ts:133-158 (registration)
    Registration of the 'send_buttons' tool in the tools array, including name, description, and input schema definition.
    {
      name: 'send_buttons',
      description: 'Send message with buttons',
      inputSchema: {
        type: 'object',
        properties: {
          instanceName: { type: 'string', description: 'Instance name' },
          number: { type: 'string', description: 'Recipient phone number' },
          title: { type: 'string', description: 'Message title' },
          description: { type: 'string', description: 'Message description' },
          footer: { type: 'string', description: 'Message footer' },
          buttons: {
            type: 'array',
            items: {
              type: 'object',
              properties: {
                buttonId: { type: 'string' },
                displayText: { type: 'string' }
              }
            },
            description: 'Array of buttons'
          }
        },
        required: ['instanceName', 'number', 'buttons']
      }
    },
  • The primary handler function for the 'send_buttons' tool. It transforms the input buttons format, calls the EvolutionAPI sendButtons method, and formats the response as MCP content.
    private async handleSendButtons(args: any) {
      const buttons = args.buttons.map((btn: any) => ({
        buttonId: btn.buttonId,
        buttonText: { displayText: btn.displayText }
      }));
    
      const result = await evolutionAPI.sendButtons(args.instanceName, {
        number: args.number,
        title: args.title,
        description: args.description,
        footer: args.footer,
        buttons
      });
      return {
        content: [
          {
            type: 'text',
            text: JSON.stringify(result, null, 2)
          }
        ]
      };
    }
  • Helper method in EvolutionAPI service that performs the actual HTTP POST request to the Evolution API endpoint /message/sendButtons/{instanceName} to send buttons message.
    async sendButtons(instanceName: string, data: {
      number: string;
      title?: string;
      description?: string;
      footer?: string;
      buttons: Array<{
        buttonId: string;
        buttonText: { displayText: string };
      }>;
    }): Promise<Message> {
      const response = await this.client.post(`/message/sendButtons/${instanceName}`, data);
      return response.data;
    }

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

D1.9/5.0
Behavior1/5

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

No annotations are present, so the description carries full burden. It fails to disclose any behavioral traits such as whether the action is destructive, requires authentication, or has side effects. The description provides no behavioral context.

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

Conciseness2/5

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

The description is extremely short (4 words), but this is due to under-specification rather than conciseness. It lacks structured information and misses key details that would help an agent.

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

Completeness1/5

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

Given the tool has 6 parameters and no output schema or annotations, the description is grossly incomplete. It fails to provide essential context such as expected behavior, return data, or error conditions.

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?

Schema description coverage is 100%, so the schema already documents all parameters. The description adds no additional meaning beyond what is in the schema, meeting the baseline expectation.

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

Purpose2/5

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

The description states the basic action (send a message with buttons), but it is vague and does not distinguish from sibling tools like send_text, send_list, or send_media. A more specific verb and resource description would improve clarity.

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. The description does not mention any context, prerequisites, or exclusions, leaving the agent without decision support.

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