Skip to main content
Glama

siigo_get_invoices

Retrieve invoice data from Siigo accounting software using filters for date ranges, pagination, and page size to manage financial records.

Instructions

Get list of invoices from Siigo

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
created_endNoEnd date filter (YYYY-MM-DD)
created_startNoStart date filter (YYYY-MM-DD)
pageNoPage number
page_sizeNoNumber of items per page

Implementation Reference

  • Core handler function that performs the authenticated GET request to Siigo API endpoint /v1/invoices with optional parameters for pagination and date filtering.
    async getInvoices(params?: { page?: number; page_size?: number; created_start?: string; created_end?: string }): Promise<SiigoApiResponse<SiigoInvoice>> { return this.makeRequest<SiigoInvoice>('GET', '/v1/invoices', undefined, params); }
  • MCP server-side handler for the tool call: delegates to SiigoClient.getInvoices and formats the response as MCP content.
    private async handleGetInvoices(args: any) { const result = await this.siigoClient.getInvoices(args); return { content: [ { type: 'text', text: JSON.stringify(result, null, 2), }, ], }; }
  • src/index.ts:83-84 (registration)
    Switch case in CallToolRequest handler that routes 'siigo_get_invoices' tool calls to the appropriate handler method.
    case 'siigo_get_invoices': return await this.handleGetInvoices(args);
  • Tool registration entry in ListTools response, including name, description, and input schema definition.
    { name: 'siigo_get_invoices', description: 'Get list of invoices from Siigo', inputSchema: { type: 'object', properties: { page: { type: 'number', description: 'Page number' }, page_size: { type: 'number', description: 'Number of items per page' }, created_start: { type: 'string', description: 'Start date filter (YYYY-MM-DD)' }, created_end: { type: 'string', description: 'End date filter (YYYY-MM-DD)' }, }, }, },
  • Helper method for making authenticated API requests to Siigo, used by getInvoices.
    private async makeRequest<T>(method: string, endpoint: string, data?: any, params?: any): Promise<SiigoApiResponse<T>> { await this.authenticate(); try { const response: AxiosResponse<SiigoApiResponse<T>> = await this.httpClient.request({ method, url: endpoint, data, params, }); return response.data; } catch (error: any) { if (error.response?.data) { return error.response.data; } throw new Error(`API request failed: ${error.message}`); } }

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/jdlar1/siigo-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server