Skip to main content
Glama
billyfranklim1

mcp-evolution

Send Contact

send_contact

Send one or more contact details as vCards to a WhatsApp number or group.

Instructions

Share one or more contacts (vCards) via the pinned WhatsApp instance.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
numberYesRecipient JID or phone number (e.g. 5511999999999 or group@g.us)
contactYesArray of contacts to share

Implementation Reference

  • The registerSendContact function that registers the 'send_contact' tool. The handler function (lines 29-40) sends contact(s) by making a POST request to /message/sendContact/{instanceName} with number and contact array, then returns the JSON response.
    export function registerSendContact(server: McpServer, client: EvolutionClient): void {
      server.registerTool(
        "send_contact",
        {
          title: "Send Contact",
          description: "Share one or more contacts (vCards) via the pinned WhatsApp instance.",
          inputSchema: schema,
        },
        async (args) => {
          try {
            const data = await client.post(`/message/sendContact/${client.instanceName}`, {
              number: args.number,
              contact: args.contact,
            });
            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;
          }
        }
      );
    }
  • Schema definitions for the send_contact tool. ContactSchema defines the per-contact fields (fullName, wuid, phoneNumber, organization, email, url). The input schema takes a 'number' (PhoneOrJidSchema) and an array of 'contact' objects.
    import { z } from "zod";
    import type { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
    import { McpError } from "@modelcontextprotocol/sdk/types.js";
    import type { EvolutionClient } from "../evolution-client.js";
    import { PhoneOrJidSchema } from "../schemas.js";
    
    const ContactSchema = z.object({
      fullName: z.string().min(1).describe("Contact's full name"),
      wuid: z.string().min(1).describe("WhatsApp UID (e.g. 5511999999999@s.whatsapp.net)"),
      phoneNumber: z.string().min(1).describe("Phone number in international format"),
      organization: z.string().optional().describe("Contact's organization/company"),
      email: z.string().email().optional().describe("Contact's email address"),
      url: z.string().url().optional().describe("Contact's website URL"),
    });
    
    const schema = {
      number: PhoneOrJidSchema,
      contact: z.array(ContactSchema).min(1).describe("Array of contacts to share"),
    };
  • Import of registerSendContact from send-contact.ts in the central tools index.
    import { registerSendContact } from "./send-contact.js";
  • Registration call: registerSendContact(server, client) invoked inside registerAllTools.
    registerSendContact(server, client);
  • PhoneOrJidSchema used as the input schema for the 'number' parameter - accepts WhatsApp JID or phone number.
    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 describes the action without revealing prerequisites, error conditions, or side effects, such as whether the recipient must be a valid WhatsApp user or what happens on failure.

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, front-loaded sentence of 12 words with no unnecessary information, achieving maximum conciseness.

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

Completeness3/5

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

For a simple send action with two well-documented parameters, the description is adequate but misses important context such as limits on contact count, format of vCards, or required recipient validity.

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 coverage is 100%, and the description does not add meaning beyond what is already in the schema. It mentions 'one or more contacts,' which echoes the minItems constraint, but provides no additional parameter insight.

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 action ('Share one or more contacts (vCards)') and the specific platform ('via the pinned WhatsApp instance'), distinguishing it from sibling tools like send_text or send_media.

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

Usage Guidelines4/5

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

The description provides clear context for when to use the tool (sharing contacts via WhatsApp), but lacks explicit guidance on when not to use it or alternative tools for similar purposes.

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