Skip to main content
Glama

siigo_get_product

Retrieve product details from Siigo accounting software using the product ID to access specific product information for inventory management or sales processes.

Instructions

Get a specific product by ID

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesProduct ID

Implementation Reference

  • Core handler implementation: Makes a GET request to Siigo API endpoint `/v1/products/${id}` to retrieve a specific product.
    async getProduct(id: string): Promise<SiigoApiResponse<SiigoProduct>> { return this.makeRequest<SiigoProduct>('GET', `/v1/products/${id}`); }
  • MCP server wrapper handler for 'siigo_get_product' tool: Extracts ID from args, calls SiigoClient.getProduct, and formats result as JSON text content.
    private async handleGetProduct(args: any) { const result = await this.siigoClient.getProduct(args.id); return { content: [ { type: 'text', text: JSON.stringify(result, null, 2), }, ], }; }
  • src/index.ts:209-219 (registration)
    Tool registration in getTools(): Defines name, description, and input schema requiring 'id' parameter.
    { name: 'siigo_get_product', description: 'Get a specific product by ID', inputSchema: { type: 'object', properties: { id: { type: 'string', description: 'Product ID' }, }, required: ['id'], }, },
  • TypeScript interface defining the structure of a Siigo product (output type).
    export interface SiigoProduct { id?: string; code: string; name: string; account_group: number; type?: 'Product' | 'Service' | 'ConsumerGood'; stock_control?: boolean; active?: boolean; tax_classification?: 'Taxed' | 'Exempt' | 'Excluded'; tax_included?: boolean; tax_consumption_value?: number; taxes?: Array<{ id: number; milliliters?: number; rate?: number; }>; prices?: Array<{ currency_code: string; price_list: Array<{ position: number; value: number; }>; }>; unit?: string; unit_label?: string; reference?: string; description?: string; additional_fields?: { barcode?: string; brand?: string; tariff?: string; model?: string; }; }
  • Supporting utility: Generic authenticated HTTP request method used by all API calls, including getProduct.
    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