Skip to main content
Glama
EvandroSchechtel

WhatsApp Business MCP Server

send_location_message

Share location coordinates with WhatsApp contacts by sending a map pin containing latitude, longitude, optional name, and address information.

Instructions

Send a location pin to a WhatsApp number.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
toYesRecipient phone number
latitudeYesLocation latitude
longitudeYesLocation longitude
nameNoLocation name
addressNoLocation address

Implementation Reference

  • The actual implementation of sending a location message via the WhatsApp API.
    async sendLocationMessage(
      to: string,
      location: { latitude: number; longitude: number; name?: string; address?: string }
    ) {
      return this.request(`/${this.config.phoneNumberId}/messages`, "POST", {
        messaging_product: "whatsapp",
        to,
        type: "location",
        location,
      });
    }
  • src/index.ts:233-247 (registration)
    MCP tool registration for 'send_location_message' which validates input and calls the WhatsApp client.
    server.tool(
      "send_location_message",
      "Send a location pin to a WhatsApp number.",
      {
        to: z.string().describe("Recipient phone number"),
        latitude: z.number().describe("Location latitude"),
        longitude: z.number().describe("Location longitude"),
        name: z.string().optional().describe("Location name"),
        address: z.string().optional().describe("Location address"),
      },
      async ({ to, latitude, longitude, name, address }) =>
        executeWithHooks("send_location_message", { to, latitude, longitude }, config, () =>
          wa.sendLocationMessage(to, { latitude, longitude, name, address })
        )
    );

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/EvandroSchechtel/mcp-whatsapp'

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