Skip to main content
Glama
billyfranklim1

mcp-evolution

Send Text

send_text

Send a text message to any WhatsApp number or group using the pinned WhatsApp instance. Provide the recipient's phone number or JID and the message text.

Instructions

Send a text message via the pinned WhatsApp instance.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
numberYesRecipient JID or phone number (e.g. 5511999999999 or group@g.us)
textYesMessage text to send

Implementation Reference

  • The registerSendText function registers the 'send_text' tool. The handler function (lines 20-35) calls the Evolution API endpoint /message/sendText/{instanceName} with the number and text args, then returns the response as JSON.
    export function registerSendText(server: McpServer, client: EvolutionClient): void {
      server.registerTool(
        "send_text",
        {
          title: "Send Text",
          description: "Send a text message via the pinned WhatsApp instance.",
          inputSchema: schema,
        },
        async (args) => {
          try {
            const data = await client.post(`/message/sendText/${client.instanceName}`, {
              number: args.number,
              text: args.text,
            });
            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;
          }
        }
      );
    }
  • Input schema for the 'send_text' tool: expects 'number' (PhoneOrJidSchema - JID or phone number string) and 'text' (non-empty string for the message text).
    const schema = {
      number: PhoneOrJidSchema,
      text: z.string().min(1).describe("Message text to send"),
    };
  • Registration call that wires registerSendText into the MCP server via registerAllTools.
    registerSendText(server, client);
  • PhoneOrJidSchema used by the send_text tool: validates that the recipient field is a non-empty string (JID or phone number).
    export const PhoneOrJidSchema = z
      .string()
      .min(1)
      .describe("Recipient JID or phone number (e.g. 5511999999999 or group@g.us)");
  • The post method on EvolutionClient used by the send_text handler to make the HTTP POST request.
    async post<T = unknown>(path: string, body: unknown): Promise<T> {
      return this.request<T>("POST", path, body);
    }
    
    async delete<T = unknown>(path: string, body?: unknown): Promise<T> {
      return this.request<T>("DELETE", path, body);
    }
Behavior3/5

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

No annotations are provided, so the description carries full behavioral burden. It states the action ('send') and the target instance ('pinned'), but does not disclose side effects (e.g., instance state changes), failure conditions, or rate limits. For a simple send, this is minimally adequate but not extensive.

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?

A single sentence that front-loads the core action and resource. No extraneous information; every word adds value.

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

Completeness4/5

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

Given the tool's simplicity and the full schema coverage, the description provides enough information for correct invocation. However, the absence of any mention of return values or success/failure indicators slightly lowers completeness, though this is mitigated by the lack of an output schema.

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 clear descriptions for both parameters ('number' and 'text'). The description adds no additional meaning beyond the schema, so baseline score of 3 is appropriate.

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?

Description explicitly states 'Send a text message', which is a specific verb and resource that differentiates it from sibling tools like send_audio or send_media. The reference to 'pinned WhatsApp instance' adds context about the execution environment.

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 explicitly state when to use this tool versus alternatives like send_button or send_list. However, the tool name and description clearly indicate its purpose for text messages, providing implicit guidance.

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