Skip to main content
Glama

waha_unblock_contact

Remove a contact from your WhatsApp block list using their contact ID to restore communication.

Instructions

Unblock a contact.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
contactIdYesContact ID to unblock (format: number@c.us)

Implementation Reference

  • The main handler function for the 'waha_unblock_contact' tool. Extracts contactId from arguments, validates it, calls the WAHA client's unblockContact method, and returns a formatted success response.
    private async handleUnblockContact(args: any) { const contactId = args.contactId; if (!contactId) { throw new Error("contactId is required"); } await this.wahaClient.unblockContact(contactId); return { content: [ { type: "text", text: `Successfully unblocked contact ${contactId}.`, }, ], }; }
  • The input schema and metadata definition for the 'waha_unblock_contact' tool, specifying the required 'contactId' parameter.
    name: "waha_unblock_contact", description: "Unblock a contact.", inputSchema: { type: "object", properties: { contactId: { type: "string", description: "Contact ID to unblock (format: number@c.us)", }, }, required: ["contactId"], }, },
  • src/index.ts:1148-1149 (registration)
    Tool call registration in the MCP CallToolRequestSchema handler's switch statement, routing calls to the handleUnblockContact method.
    return await this.handleUnblockContact(args); case "waha_get_presence":
  • The WAHAClient helper method that sends a POST request to /api/contacts/unblock to perform the unblock operation.
    async unblockContact(contactId: string): Promise<void> { if (!contactId) { throw new WAHAError("contactId is required"); } const body = { contactId, session: this.session, }; await this.request<void>("/api/contacts/unblock", { method: "POST", body: JSON.stringify(body), }); }

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/seejux/waha-mcp'

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