Skip to main content
Glama
gfb-47

WhatsApp MCP Server

by gfb-47

list-recent-contacts

Retrieve recently contacted WhatsApp users to quickly access conversation history or initiate new messages without manual searching.

Instructions

List recently contacted people on WhatsApp (simplified)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • src/index.ts:182-210 (registration)
    Registration of the 'list-recent-contacts' tool with server.tool(). Includes tool name, description, empty schema, and inline handler function.
    // Tool to list recent WhatsApp contacts (simplified version) server.tool( "list-recent-contacts", "List recently contacted people on WhatsApp (simplified)", {}, async () => { try { return { content: [ { type: "text", text: "Due to WhatsApp's privacy protections, listing contacts programmatically is limited. " + "Please specify the exact contact name when sending messages.", } ] }; } catch (error) { return { content: [ { type: "text", text: `Error listing contacts: ${error}`, } ], isError: true }; } } );
  • Inline handler function for the tool. Returns a standardized message about privacy limitations or an error response.
    async () => { try { return { content: [ { type: "text", text: "Due to WhatsApp's privacy protections, listing contacts programmatically is limited. " + "Please specify the exact contact name when sending messages.", } ] }; } catch (error) { return { content: [ { type: "text", text: `Error listing contacts: ${error}`, } ], isError: true }; } }

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/gfb-47/whatsapp-mcp-server'

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