get_invoices
Retrieve invoices from Simplicate business data to access billing information, track payments, and manage financial records.
Instructions
Retrieve invoices
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | ||
| offset | No |
Input Schema (JSON Schema)
{
"properties": {
"limit": {
"type": "number"
},
"offset": {
"type": "number"
}
},
"type": "object"
}
Implementation Reference
- src/mcp/server.ts:304-317 (handler)The handler for the 'get_invoices' tool call. It parses input arguments for limit and offset, calls SimplicateService.getInvoices, stringifies the result as JSON, and returns it as text content.case 'get_invoices': { const invoices = await this.simplicateService.getInvoices({ limit: (toolArgs.limit as number) || 10, offset: (toolArgs.offset as number) || 0, }); return { content: [ { type: 'text', text: JSON.stringify(invoices, null, 2), }, ], }; }
- src/mcp/server.ts:147-163 (registration)Registration of the 'get_invoices' tool in the ListToolsRequestHandler response, including name, description, and input schema definition.{ name: 'get_invoices', description: 'Retrieve invoices from Simplicate', inputSchema: { type: 'object', properties: { limit: { type: 'number', description: 'Maximum number of invoices to return (default: 10)', }, offset: { type: 'number', description: 'Number of invoices to skip (for pagination)', }, }, }, },
- src/mcp/server.ts:150-162 (schema)Input schema definition for the 'get_invoices' tool, specifying optional limit and offset parameters.inputSchema: { type: 'object', properties: { limit: { type: 'number', description: 'Maximum number of invoices to return (default: 10)', }, offset: { type: 'number', description: 'Number of invoices to skip (for pagination)', }, }, },
- src/simplicate/services.ts:124-127 (helper)The core helper method in SimplicateService that performs the actual API call to fetch invoices from the '/invoices/invoice' endpoint using pagination params.async getInvoices(params?: { limit?: number; offset?: number }): Promise<SimplicateInvoice[]> { const response = await this.client.get('/invoices/invoice', params); return response.data || []; }