siigo_update_invoice
Modify existing invoice records in the Siigo accounting system by providing the invoice ID and updated data fields.
Instructions
Update an existing invoice
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | Invoice ID | |
| invoice | Yes | Invoice data to update |
Implementation Reference
- src/index.ts:926-936 (handler)MCP tool handler function that extracts id and invoice from args, calls SiigoClient.updateInvoice, and formats the result as MCP content response.private async handleUpdateInvoice(args: any) { const result = await this.siigoClient.updateInvoice(args.id, args.invoice); return { content: [ { type: 'text', text: JSON.stringify(result, null, 2), }, ], }; }
- src/index.ts:397-408 (schema)Tool definition including name, description, and input schema for argument validation.{ name: 'siigo_update_invoice', description: 'Update an existing invoice', inputSchema: { type: 'object', properties: { id: { type: 'string', description: 'Invoice ID' }, invoice: { type: 'object', description: 'Invoice data to update' }, }, required: ['id', 'invoice'], }, },
- src/index.ts:89-90 (registration)Switch case registration that dispatches tool calls to the specific handler.case 'siigo_update_invoice': return await this.handleUpdateInvoice(args);
- src/siigo-client.ts:112-114 (helper)SiigoClient method that performs the actual PUT API request to update the invoice via Siigo API.async updateInvoice(id: string, invoice: Partial<SiigoInvoice>): Promise<SiigoApiResponse<SiigoInvoice>> { return this.makeRequest<SiigoInvoice>('PUT', `/v1/invoices/${id}`, invoice); }