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
| Name | Required | Description | Default |
|---|---|---|---|
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 }; } } );
- src/index.ts:187-210 (handler)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 }; } } );
- src/index.ts:186-186 (schema)Empty input schema for the 'list-recent-contacts' tool (no parameters required).{},