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;
    }
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 of behavioral disclosure. 'Send message with buttons' implies a write operation that transmits data, but it doesn't disclose critical behaviors: whether this requires authentication (implied by instanceName), rate limits, what happens on success/failure, if buttons trigger actions, or any side effects. For a mutation tool with zero annotation coverage, this is a significant gap in transparency.

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

Conciseness5/5

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

The description is extremely concise with just three words: 'Send message with buttons.' It's front-loaded with the core action and resource, with zero wasted words. Every element earns its place by directly stating the tool's function without redundancy or fluff.

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 of a 6-parameter mutation tool with no annotations and no output schema, the description is incomplete. It lacks context about the messaging platform, behavioral traits (e.g., what sending entails, error handling), and doesn't explain the return values or how to interpret results. For a tool that likely interacts with an external system (e.g., WhatsApp API), more detail is needed to guide effective 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?

Schema description coverage is 100%, with all 6 parameters documented in the schema (e.g., buttons, description, footer, instanceName, number, title). The description adds no parameter semantics beyond what the schema provides—it doesn't explain button functionality, format constraints, or how parameters interact. Baseline is 3 since the schema does the heavy lifting, but the description doesn't compensate with additional insights.

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 'Send message with buttons' states a verb ('send') and resource ('message with buttons'), making the basic purpose clear. However, it lacks specificity about what kind of message system this is (WhatsApp, messaging platform) and doesn't distinguish from siblings like send_text, send_media, send_template, or send_list, which all send different types of messages. The purpose is vague beyond the basic action.

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 no guidance on when to use this tool versus alternatives. With siblings like send_text (plain text), send_media (media files), send_template (predefined templates), and send_list (list messages), there's no indication that this tool is specifically for interactive button-based messages or when it's preferred over other send methods. No context or exclusions are mentioned.

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