siigo_get_customers
Retrieve customer lists from Siigo accounting software with pagination and filtering options to manage client data efficiently.
Instructions
Get list of customers from Siigo
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| page | No | Page number | |
| page_size | No | Number of items per page | |
| type | No | Customer type filter |
Implementation Reference
- src/index.ts:842-852 (handler)MCP tool handler that invokes SiigoClient.getCustomers and returns the JSON-formatted result.private async handleGetCustomers(args: any) { const result = await this.siigoClient.getCustomers(args); return { content: [ { type: 'text', text: JSON.stringify(result, null, 2), }, ], }; }
- src/index.ts:275-285 (schema)Tool definition including name, description, and input schema for pagination and type filtering.name: 'siigo_get_customers', description: 'Get list of customers from Siigo', inputSchema: { type: 'object', properties: { page: { type: 'number', description: 'Page number' }, page_size: { type: 'number', description: 'Number of items per page' }, type: { type: 'string', description: 'Customer type filter' }, }, }, },
- src/index.ts:73-74 (registration)Switch case registration that routes calls to the siigo_get_customers tool to its handler.case 'siigo_get_customers': return await this.handleGetCustomers(args);
- src/siigo-client.ts:83-85 (helper)SiigoClient method that performs the actual API GET request to /v1/customers endpoint.async getCustomers(params?: { page?: number; page_size?: number; type?: string }): Promise<SiigoApiResponse<SiigoCustomer>> { return this.makeRequest<SiigoCustomer>('GET', '/v1/customers', undefined, params); }
- src/types.ts:15-57 (schema)TypeScript interface defining the structure of a Siigo customer object used in API responses.export interface SiigoCustomer { id?: string; type?: 'Customer' | 'Supplier' | 'Other'; person_type: 'Person' | 'Company'; id_type: string; identification: string; check_digit?: string; name: string[]; commercial_name?: string; branch_office?: number; active?: boolean; vat_responsible?: boolean; fiscal_responsibilities?: Array<{ code: string }>; address: { address: string; city: { country_code: string; state_code: string; city_code: string; }; postal_code?: string; }; phones: Array<{ indicative?: string; number: string; extension?: string; }>; contacts: Array<{ first_name: string; last_name: string; email: string; phone?: { indicative?: string; number?: string; extension?: string; }; }>; comments?: string; related_users?: { seller_id?: number; collector_id?: number; }; }