siigo_create_voucher
Generate accounting vouchers in Siigo software to document financial transactions and maintain accurate records for Colombian businesses.
Instructions
Create a new voucher
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| voucher | Yes | Voucher data |
Implementation Reference
- src/siigo-client.ts:150-152 (handler)Core handler function that executes the tool logic by making an authenticated POST request to the Siigo API endpoint '/v1/vouchers' to create a new voucher.async createVoucher(voucher: any): Promise<SiigoApiResponse<any>> { return this.makeRequest<any>('POST', '/v1/vouchers', voucher); }
- src/index.ts:1001-1004 (handler)MCP tool handler that receives tool arguments, delegates to SiigoClient.createVoucher, and returns the formatted JSON response.private async handleCreateVoucher(args: any) { const result = await this.siigoClient.createVoucher(args.voucher); return { content: [{ type: 'text', text: JSON.stringify(result, null, 2) }] }; }
- src/index.ts:503-513 (registration)Tool registration in the list of available tools, including name, description, and input schema definition.{ name: 'siigo_create_voucher', description: 'Create a new voucher', inputSchema: { type: 'object', properties: { voucher: { type: 'object', description: 'Voucher data' }, }, required: ['voucher'], }, },
- src/index.ts:111-112 (handler)Dispatch case in the main CallToolRequest handler switch statement that routes to the specific tool handler.case 'siigo_create_voucher': return await this.handleCreateVoucher(args);