Skip to main content
Glama

siigo_get_vouchers

Retrieve cash receipts from Siigo accounting software using pagination parameters to access voucher lists for financial tracking.

Instructions

Get list of vouchers (cash receipts) from Siigo

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pageNoPage number
page_sizeNoNumber of items per page

Implementation Reference

  • MCP server handler that executes the siigo_get_vouchers tool by calling SiigoClient.getVouchers and formatting the response as JSON text content.
    private async handleGetVouchers(args: any) { const result = await this.siigoClient.getVouchers(args); return { content: [{ type: 'text', text: JSON.stringify(result, null, 2) }] };
  • Core utility method implementing the tool logic: makes an authenticated GET request to Siigo API endpoint '/v1/vouchers' with optional pagination params.
    async getVouchers(params?: { page?: number; page_size?: number }): Promise<SiigoApiResponse<any>> { return this.makeRequest<any>('GET', '/v1/vouchers', undefined, params); }
  • src/index.ts:481-491 (registration)
    Tool registration in the listTools response: defines name, description, and input schema for pagination.
    { name: 'siigo_get_vouchers', description: 'Get list of vouchers (cash receipts) from Siigo', inputSchema: { type: 'object', properties: { page: { type: 'number', description: 'Page number' }, page_size: { type: 'number', description: 'Number of items per page' }, }, }, },
  • JSON schema defining the tool's input parameters: optional page and page_size for pagination.
    inputSchema: { type: 'object', properties: { page: { type: 'number', description: 'Page number' }, page_size: { type: 'number', description: 'Number of items per page' }, },
  • Supporting utility that handles authentication, makes Axios requests to Siigo API, and processes responses or errors.
    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