get_persons
Retrieve contact persons from Simplicate business data to access CRM information, manage contacts, and support customer relationship management activities.
Instructions
Retrieve contact persons
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | ||
| offset | No |
Input Schema (JSON Schema)
{
"properties": {
"limit": {
"type": "number"
},
"offset": {
"type": "number"
}
},
"type": "object"
}
Implementation Reference
- src/mcp/server.basic.ts:99-115 (registration)Registration of the 'get_persons' tool in the ListToolsRequestHandler, including name, description, and input schema.{ name: 'get_persons', description: 'Retrieve a list of persons (contacts) from Simplicate', inputSchema: { type: 'object', properties: { limit: { type: 'number', description: 'Maximum number of persons to return (default: 10)', }, offset: { type: 'number', description: 'Number of persons to skip (for pagination)', }, }, }, },
- src/mcp/server.basic.ts:257-270 (handler)Tool handler for 'get_persons' in CallToolRequestHandler switch statement. Extracts parameters, calls SimplicateService.getPersons, and returns JSON-formatted response.case 'get_persons': { const persons = await this.simplicateService.getPersons({ limit: (toolArgs.limit as number) || 10, offset: (toolArgs.offset as number) || 0, }); return { content: [ { type: 'text', text: JSON.stringify(persons, null, 2), }, ], }; }
- src/simplicate/services.ts:102-105 (helper)Core helper function implementing getPersons logic by calling the Simplicate API endpoint '/crm/person' with optional pagination parameters.async getPersons(params?: { limit?: number; offset?: number }): Promise<SimplicatePerson[]> { const response = await this.client.get('/crm/person', params); return response.data || []; }
- src/simplicate/services.ts:32-42 (schema)TypeScript interface defining the structure of a SimplicatePerson (output schema for getPersons).export interface SimplicatePerson { id: string; first_name: string; family_name: string; email?: string; phone?: string; organization?: { id: string; name: string; }; }
- src/mcp/server-full.ts:455-460 (handler)Alternative handler for 'get_persons' in the full-featured MCP server using SimplicateServiceExtended.case 'get_persons': { const data = await this.simplicateService.getPersons({ limit: (toolArgs.limit as number) || 10, offset: (toolArgs.offset as number) || 0, }); return { content: [{ type: 'text', text: JSON.stringify(data, null, 2) }] };