Skip to main content
Glama
billyfranklim1

mcp-evolution

Send Button

send_button

Send interactive WhatsApp button messages with up to three reply, URL, or call buttons via a pinned instance.

Instructions

Send a WhatsApp interactive button message via the pinned instance (max 3 buttons).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
numberYesRecipient JID or phone number (e.g. 5511999999999 or group@g.us)
titleYesMessage title
descriptionYesMessage body
footerNoOptional footer text
buttonsYesArray of buttons (max 3)

Implementation Reference

  • The registerSendButton function registers the 'send_button' tool with the MCP server. The handler builds a payload with number, title, description, optional footer, and buttons array, then POSTs to /message/sendButtons/{instanceName} via the EvolutionClient.
    export function registerSendButton(server: McpServer, client: EvolutionClient): void {
      server.registerTool(
        "send_button",
        {
          title: "Send Button",
          description: "Send a WhatsApp interactive button message via the pinned instance (max 3 buttons).",
          inputSchema: schema,
        },
        async (args) => {
          try {
            const payload: Record<string, unknown> = {
              number: args.number,
              title: args.title,
              description: args.description,
              buttons: args.buttons,
            };
            if (args.footer) payload["footer"] = args.footer;
            const data = await client.post(`/message/sendButtons/${client.instanceName}`, payload);
            return { content: [{ type: "text" as const, text: JSON.stringify(data, null, 2) }] };
          } catch (e) {
            if (e instanceof McpError) return { isError: true, content: [{ type: "text" as const, text: e.message }] };
            throw e;
          }
        }
      );
    }
  • ButtonSchema defines individual button objects with type (reply/url/call), displayText, and optional id/url/phoneNumber. The input schema includes number (PhoneOrJidSchema), title, description, optional footer, and an array of buttons.
    const ButtonSchema = z.object({
      type: z.enum(["reply", "url", "call"]).describe("Button type"),
      displayText: z.string().min(1).describe("Button label text"),
      id: z.string().optional().describe("Button ID for reply buttons"),
      url: z.string().url().optional().describe("URL for url-type buttons"),
      phoneNumber: z.string().optional().describe("Phone number for call-type buttons"),
    });
    
    const schema = {
      number: PhoneOrJidSchema,
      title: z.string().min(1).describe("Message title"),
      description: z.string().min(1).describe("Message body"),
      footer: z.string().optional().describe("Optional footer text"),
      buttons: z.array(ButtonSchema).min(1).describe("Array of buttons (max 3)"),
    };
  • The registerSendButton function is called in registerAllTools to register the 'send_button' tool with the server and client.
    registerSendButton(server, client);
  • PhoneOrJidSchema is used as the type for the 'number' field, accepting a JID or phone number string.
    export const PhoneOrJidSchema = z
      .string()
      .min(1)
      .describe("Recipient JID or phone number (e.g. 5511999999999 or group@g.us)");
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. It only mentions the maximum button count but omits important behaviors such as rate limits, authentication requirements, error handling, or response format. This is insufficient for a send operation.

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 a single, concise sentence that includes the key functional detail (max 3 buttons) without any superfluous text. It is well-structured and front-loaded.

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 tool's complexity (5 parameters including a nested array) and the absence of an output schema, the description is incomplete. It does not explain the button types, their required fields, or what the tool returns, leaving significant gaps for correct invocation.

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 already provides full descriptions for all parameters (100% coverage), so the description adds no extra semantic value. It does not explain parameter relationships or provide examples beyond what the schema contains.

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

Purpose5/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: sending a WhatsApp interactive button message via the pinned instance, with a maximum of 3 buttons. This differentiates it from sibling tools like send_text or send_list.

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

Usage Guidelines3/5

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

The description does not provide explicit guidance on when to use this tool versus alternatives, nor does it mention prerequisites or limitations beyond the maximum button count. The context of sibling tools is not addressed.

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

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