siigo_get_invoice
Retrieve a specific invoice from Siigo accounting software using its unique ID to access detailed billing information and transaction records.
Instructions
Get a specific invoice by ID
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | Invoice ID |
Implementation Reference
- src/index.ts:902-911 (handler)MCP tool handler function for 'siigo_get_invoice' that extracts the invoice ID from arguments, calls SiigoClient.getInvoice, and returns the result as a formatted text content response.private async handleGetInvoice(args: any) { const result = await this.siigoClient.getInvoice(args.id); return { content: [ { type: 'text', text: JSON.stringify(result, null, 2), }, ], };
- src/siigo-client.ts:104-106 (helper)SiigoClient method implementing the core logic: authenticates and makes a GET request to the Siigo API endpoint `/v1/invoices/{id}`.async getInvoice(id: string): Promise<SiigoApiResponse<SiigoInvoice>> { return this.makeRequest<SiigoInvoice>('GET', `/v1/invoices/${id}`); }
- src/index.ts:363-373 (schema)JSON schema definition for the tool, specifying input as an object requiring a string 'id' parameter.{ name: 'siigo_get_invoice', description: 'Get a specific invoice by ID', inputSchema: { type: 'object', properties: { id: { type: 'string', description: 'Invoice ID' }, }, required: ['id'], }, },
- src/index.ts:85-86 (registration)Tool registration in the CallToolRequestSchema handler's switch statement, dispatching to the specific handler.case 'siigo_get_invoice': return await this.handleGetInvoice(args);