get_organizations
Retrieve CRM organizations from Simplicate business data to access company information and manage customer relationships.
Instructions
Retrieve CRM organizations
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-full.ts:434-439 (handler)MCP tool handler for 'get_organizations': extracts params, calls simplicateService.getOrganizations(), formats response as JSON text.case 'get_organizations': { const data = await this.simplicateService.getOrganizations({ limit: (toolArgs.limit as number) || 10, offset: (toolArgs.offset as number) || 0, }); return { content: [{ type: 'text', text: JSON.stringify(data, null, 2) }] };
- src/mcp/server-full.ts:125-133 (registration)Tool registration including name, description, and input schema definition.name: 'get_organizations', description: 'Retrieve CRM organizations', inputSchema: { type: 'object', properties: { limit: { type: 'number' }, offset: { type: 'number' }, }, },
- TypeScript interface defining the structure of SimplicateOrganization (output type/schema).export interface SimplicateOrganization { id: string; name: string; coc_code?: string; email?: string; phone?: string; website?: string; relation_type?: string; address?: any;
- Helper method implementing the core API call to fetch organizations from Simplicate CRM endpoint '/crm/organization'.async getOrganizations(params?: { limit?: number; offset?: number }): Promise<SimplicateOrganization[]> { const response = await this.client.get('/crm/organization', params); return response.data || [];
- src/mcp/server.basic.ts:225-237 (handler)Alternative/basic MCP tool handler for 'get_organizations' in server.basic.ts.case 'get_organizations': { const organizations = await this.simplicateService.getOrganizations({ limit: (toolArgs.limit as number) || 10, offset: (toolArgs.offset as number) || 0, }); return { content: [ { type: 'text', text: JSON.stringify(organizations, null, 2), }, ], };