get_invoices
Retrieve invoices from Simplicate business data to access billing information, track payments, and manage financial records.
Instructions
Retrieve invoices
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "get_invoices"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | ||
| offset | No |
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 || []; }