Skip to main content
Glama

siigo_get_invoice

Retrieve a specific invoice from Siigo accounting software by providing its unique ID to access invoice details and records.

Instructions

Get a specific invoice by ID

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesInvoice ID

Implementation Reference

  • The MCP tool handler for 'siigo_get_invoice' that extracts the invoice ID from arguments, calls SiigoClient.getInvoice, and returns the result as a formatted JSON text content block.
    private async handleGetInvoice(args: any) { const result = await this.siigoClient.getInvoice(args.id); return { content: [ { type: 'text', text: JSON.stringify(result, null, 2), }, ], }; }
  • src/index.ts:363-373 (registration)
    Registration of the 'siigo_get_invoice' tool in the MCP server's tool list, including its name, description, and input schema definition.
    { name: 'siigo_get_invoice', description: 'Get a specific invoice by ID', inputSchema: { type: 'object', properties: { id: { type: 'string', description: 'Invoice ID' }, }, required: ['id'], }, },
  • Core implementation of the invoice retrieval in SiigoClient, which uses the shared makeRequest method to perform an authenticated GET request to the Siigo API endpoint `/v1/invoices/{id}`.
    async getInvoice(id: string): Promise<SiigoApiResponse<SiigoInvoice>> { return this.makeRequest<SiigoInvoice>('GET', `/v1/invoices/${id}`); }
  • TypeScript interface SiigoInvoice defining the structure of an invoice object, used as the generic type for the API response in getInvoice.
    export interface SiigoInvoice { id?: string; document: { id: number; number?: number; }; date: string; customer: { person_type?: string; id_type?: string; identification: string; branch_office?: number; name?: string[]; address?: any; phones?: any[]; contacts?: any[]; }; cost_center?: number; currency?: { code: string; exchange_rate: number; }; seller: number; observations?: string; items: Array<{ code: string; description?: string; quantity: number; price: number; discount?: number; taxes?: Array<{ id: number }>; }>; payments: Array<{ id: number; value: number; due_date?: string; }>; stamp?: { send: boolean; }; mail?: { send: boolean; }; global_discounts?: Array<{ id: number; percentage?: number; value?: number; }>; additional_fields?: any; }

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