Skip to main content
Glama
gfb-47

WhatsApp MCP Server

by gfb-47

list-recent-contacts

Retrieve a list of recently contacted individuals on WhatsApp using programmatic automation with AppleScript to simplify interactions without direct UI engagement.

Instructions

List recently contacted people on WhatsApp (simplified)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • src/index.ts:183-210 (registration)
    Registration of the 'list-recent-contacts' MCP tool. Includes the tool name, description, empty input schema ({}), and an inline async handler function that returns a text response explaining the limitation in listing contacts due to WhatsApp privacy protections, with error handling.
    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 }; } } );
  • The inline handler function for the 'list-recent-contacts' tool. It returns a structured content response indicating that contact listing is limited, or an error response if an exception occurs.
    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 }; } } );
  • Empty input schema for the 'list-recent-contacts' tool (no parameters required).
    {},

Other Tools

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

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