Skip to main content
Glama

siigo_update_product

Modify existing product information in Siigo accounting software by providing the product ID and updated data fields to maintain accurate inventory and financial records.

Instructions

Update an existing product

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesProduct ID
productYesProduct data to update

Implementation Reference

  • Core handler function that performs the PUT request to Siigo API to update a product.
    async updateProduct(id: string, product: Partial<SiigoProduct>): Promise<SiigoApiResponse<SiigoProduct>> { return this.makeRequest<SiigoProduct>('PUT', `/v1/products/${id}`, product); }
  • MCP server wrapper handler that delegates to SiigoClient and formats response.
    private async handleUpdateProduct(args: any) { const result = await this.siigoClient.updateProduct(args.id, args.product); return { content: [ { type: 'text', text: JSON.stringify(result, null, 2), }, ], }; }
  • TypeScript interface defining the SiigoProduct structure used for update.
    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; }; }
  • src/index.ts:249-260 (registration)
    Tool registration in getTools() including name, description, and input schema.
    { name: 'siigo_update_product', description: 'Update an existing product', inputSchema: { type: 'object', properties: { id: { type: 'string', description: 'Product ID' }, product: { type: 'object', description: 'Product data to update' }, }, required: ['id', 'product'], }, },
  • Helper method used by all API calls, including authentication and request handling.
    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