Skip to main content
Glama

siigo_delete_purchase

Remove a purchase record from the Siigo accounting system by specifying its unique ID to maintain accurate financial records.

Instructions

Delete a purchase

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesPurchase ID

Implementation Reference

  • MCP tool handler that extracts the purchase ID from arguments, calls SiigoClient.deletePurchase, and returns the JSON-formatted result as tool content.
    private async handleDeletePurchase(args: any) { const result = await this.siigoClient.deletePurchase(args.id); return { content: [{ type: 'text', text: JSON.stringify(result, null, 2) }] }; }
  • Core implementation of the delete purchase functionality, sending a DELETE HTTP request to the Siigo API endpoint `/v1/purchases/{id}` via the shared makeRequest method (which handles authentication).
    async deletePurchase(id: string): Promise<SiigoApiResponse<any>> { return this.makeRequest<any>('DELETE', `/v1/purchases/${id}`); }
  • Tool schema definition including name, description, and input schema requiring a string 'id' for the purchase ID.
    { name: 'siigo_delete_purchase', description: 'Delete a purchase', inputSchema: { type: 'object', properties: { id: { type: 'string', description: 'Purchase ID' }, }, required: ['id'], }, },
  • src/index.ts:123-124 (registration)
    Registration in the tool dispatcher switch statement within the CallToolRequestSchema handler, routing calls to the specific handler method.
    case 'siigo_delete_purchase': return await this.handleDeletePurchase(args);

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