Skip to main content
Glama

siigo_get_voucher

Retrieve a specific voucher from Siigo accounting software using its unique ID to access detailed transaction information and financial records.

Instructions

Get a specific voucher by ID

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesVoucher ID

Implementation Reference

  • Core implementation of the siigo_get_voucher tool. Makes a GET request to the Siigo API endpoint /v1/vouchers/{id} via the makeRequest helper, after authentication.
    async getVoucher(id: string): Promise<SiigoApiResponse<any>> { return this.makeRequest<any>('GET', `/v1/vouchers/${id}`); }
  • MCP server wrapper handler that calls SiigoClient.getVoucher with the provided id and formats the response as MCP content.
    private async handleGetVoucher(args: any) { const result = await this.siigoClient.getVoucher(args.id); return { content: [{ type: 'text', text: JSON.stringify(result, null, 2) }] }; }
  • src/index.ts:109-110 (registration)
    Switch case in the CallToolRequest handler that routes 'siigo_get_voucher' calls to the appropriate handler method.
    case 'siigo_get_voucher': return await this.handleGetVoucher(args);
  • Tool registration in getTools() including name, description, and input schema definition for 'siigo_get_voucher'.
    { name: 'siigo_get_voucher', description: 'Get a specific voucher by ID', inputSchema: { type: 'object', properties: { id: { type: 'string', description: 'Voucher ID' }, }, required: ['id'], }, },
  • Generic helper method used by getVoucher to handle authentication and make the HTTP request to Siigo API.
    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