siigo_create_credit_note
Create a new credit note in Siigo accounting software to issue refunds or adjust invoice amounts.
Instructions
Create a new credit note
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| creditNote | Yes | Credit note data |
Implementation Reference
- src/index.ts:986-989 (handler)MCP tool handler function that delegates to SiigoClient.createCreditNote and formats the response.private async handleCreateCreditNote(args: any) { const result = await this.siigoClient.createCreditNote(args.creditNote); return { content: [{ type: 'text', text: JSON.stringify(result, null, 2) }] }; }
- src/siigo-client.ts:137-139 (helper)SiigoClient method implementing the API call to create a credit note via POST to /v1/credit-notes.async createCreditNote(creditNote: any): Promise<SiigoApiResponse<any>> { return this.makeRequest<any>('POST', '/v1/credit-notes', creditNote); }
- src/index.ts:468-478 (registration)Tool registration in getTools() method, including name, description, and input schema.{ name: 'siigo_create_credit_note', description: 'Create a new credit note', inputSchema: { type: 'object', properties: { creditNote: { type: 'object', description: 'Credit note data' }, }, required: ['creditNote'], }, },
- src/index.ts:103-104 (handler)Dispatch case in the main CallToolRequestSchema handler that routes to the specific tool handler.case 'siigo_create_credit_note': return await this.handleCreateCreditNote(args);