monica_health_check
Validate Monica CRM credentials to ensure proper functionality and connectivity, enabling uninterrupted interaction with Monica CRM instances for managing contacts, activities, and tasks.
Instructions
Verify that the configured Monica credentials work.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/tools/registerTools.ts:52-62 (handler)The inline handler function for the monica_health_check tool. It invokes the MonicaClient's healthCheck method and returns a success text message.async () => { await client.healthCheck(); return { content: [ { type: 'text' as const, text: 'Successfully connected to Monica CRM API.' } ] }; }
- src/tools/registerTools.ts:48-51 (schema)Schema definition for the monica_health_check tool, including title and description used by the MCP protocol.{ title: 'Test Monica connectivity', description: 'Verify that the configured Monica credentials work.' },
- src/tools/registerTools.ts:46-63 (registration)Registration of the monica_health_check tool with the MCP server.server.registerTool( 'monica_health_check', { title: 'Test Monica connectivity', description: 'Verify that the configured Monica credentials work.' }, async () => { await client.healthCheck(); return { content: [ { type: 'text' as const, text: 'Successfully connected to Monica CRM API.' } ] }; } );
- src/client/MonicaClient.ts:1480-1482 (helper)MonicaClient.healthCheck() helper method that verifies API connectivity by making a simple request to fetch 1 contact.async healthCheck(): Promise<void> { await this.request('contacts', { searchParams: { limit: 1 } }); }