Skip to main content
Glama

siigo_update_purchase

Modify existing purchase records in Siigo accounting software by providing the purchase ID and updated data fields.

Instructions

Update an existing purchase

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesPurchase ID
purchaseYesPurchase data to update

Implementation Reference

  • MCP tool handler function that invokes SiigoClient.updatePurchase and formats the response as text content.
    private async handleUpdatePurchase(args: any) { const result = await this.siigoClient.updatePurchase(args.id, args.purchase); return { content: [{ type: 'text', text: JSON.stringify(result, null, 2) }] }; }
  • Input schema for the siigo_update_purchase tool, defining required 'id' and 'purchase' object.
    { name: 'siigo_update_purchase', description: 'Update an existing purchase', inputSchema: { type: 'object', properties: { id: { type: 'string', description: 'Purchase ID' }, purchase: { type: 'object', description: 'Purchase data to update' }, }, required: ['id', 'purchase'], }, },
  • src/index.ts:121-122 (registration)
    Registration of the tool in the switch statement for dispatching CallToolRequests.
    case 'siigo_update_purchase': return await this.handleUpdatePurchase(args);
  • Core implementation that performs the PUT request to Siigo API endpoint /v1/purchases/{id} using the generic makeRequest method.
    async updatePurchase(id: string, purchase: any): Promise<SiigoApiResponse<any>> { return this.makeRequest<any>('PUT', `/v1/purchases/${id}`, purchase); }

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