siigo_create_customer
Add new customers to Siigo accounting software by entering identification, contact details, and address information.
Instructions
Create a new customer
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| customer | Yes | Customer data |
Implementation Reference
- src/index.ts:866-876 (handler)MCP tool handler for siigo_create_customer that extracts arguments, calls SiigoClient.createCustomer, and returns formatted JSON response.private async handleCreateCustomer(args: any) { const result = await this.siigoClient.createCustomer(args.customer); return { content: [ { type: 'text', text: JSON.stringify(result, null, 2), }, ], }; }
- src/index.ts:300-336 (schema)Input schema validating the customer object structure for the siigo_create_customer tool.inputSchema: { type: 'object', properties: { customer: { type: 'object', description: 'Customer data', properties: { person_type: { type: 'string', enum: ['Person', 'Company'] }, id_type: { type: 'string', description: 'ID type code' }, identification: { type: 'string', description: 'Customer identification' }, name: { type: 'array', items: { type: 'string' }, description: 'Customer names' }, address: { type: 'object', properties: { address: { type: 'string' }, city: { type: 'object', properties: { country_code: { type: 'string' }, state_code: { type: 'string' }, city_code: { type: 'string' }, }, required: ['country_code', 'state_code', 'city_code'], }, }, required: ['address', 'city'], }, phones: { type: 'array', items: { type: 'object' } }, contacts: { type: 'array', items: { type: 'object' } }, }, required: ['person_type', 'id_type', 'identification', 'name', 'address', 'phones', 'contacts'], }, }, required: ['customer'], }, }, {
- src/index.ts:77-78 (registration)Registration and dispatch point in the tool switch statement within CallToolRequest handler.case 'siigo_create_customer': return await this.handleCreateCustomer(args);
- src/siigo-client.ts:91-93 (helper)SiigoClient helper method implementing the core API call to create a customer via POST to /v1/customers.async createCustomer(customer: SiigoCustomer): Promise<SiigoApiResponse<SiigoCustomer>> { return this.makeRequest<SiigoCustomer>('POST', '/v1/customers', customer); }