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
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | Purchase ID |
Implementation Reference
- src/index.ts:1026-1029 (handler)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) }] }; }
- src/siigo-client.ts:171-173 (handler)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}`); }
- src/index.ts:561-571 (schema)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);