waha_get_contact_about
Retrieve a WhatsApp contact's status or about text by providing their contact ID. This tool accesses profile information from WhatsApp conversations.
Instructions
Get contact's about/status text.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| contactId | Yes | Contact ID (format: number@c.us) |
Implementation Reference
- src/index.ts:2494-2511 (handler)MCP tool handler function that validates input, calls the WAHA client method getContactAbout, formats the result as JSON string, and returns it in MCP content format.private async handleGetContactAbout(args: any) { const contactId = args.contactId; if (!contactId) { throw new Error("contactId is required"); } const result = await this.wahaClient.getContactAbout(contactId); return { content: [ { type: "text", text: `About/status for ${contactId}:\n${JSON.stringify(result, null, 2)}`, }, ], }; }
- src/index.ts:925-937 (schema)Input schema definition for the tool, specifying contactId as required string parameter.{ name: "waha_get_contact_about", description: "Get contact's about/status text.", inputSchema: { type: "object", properties: { contactId: { type: "string", description: "Contact ID (format: number@c.us)", }, }, required: ["contactId"], },
- src/index.ts:1139-1141 (registration)Registration in the CallToolRequestSchema switch statement dispatching to the handler.case "waha_get_contact_about": return await this.handleGetContactAbout(args); case "waha_get_contact_profile_picture":
- src/client/waha-client.ts:1296-1314 (helper)WAHAClient helper method that makes HTTP GET request to /api/contacts/about endpoint to fetch the contact's about/status text.* Get contact's about/status text * GET /api/contacts/about?contactId=...&session=... */ async getContactAbout(contactId: string): Promise<any> { if (!contactId) { throw new WAHAError("contactId is required"); } const queryParams = { contactId, session: this.session }; const queryString = this.buildQueryString(queryParams); const endpoint = `/api/contacts/about${queryString}`; return this.request<any>(endpoint, { method: "GET", }); }