siigo_delete_purchase
Remove purchase records from Siigo accounting software by providing the purchase ID to maintain accurate financial data and eliminate outdated entries.
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 for 'siigo_delete_purchase' that extracts the purchase ID from arguments, calls SiigoClient.deletePurchase, and returns the result as formatted JSON text 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 (helper)Core helper method in SiigoClient that performs the DELETE HTTP request to the Siigo API endpoint `/v1/purchases/{id}` using the shared makeRequest utility.async deletePurchase(id: string): Promise<SiigoApiResponse<any>> { return this.makeRequest<any>('DELETE', `/v1/purchases/${id}`); }
- src/index.ts:561-571 (registration)Tool registration entry in getTools() method, defining the tool name, description, and input schema (requiring 'id' string) for MCP tool listing.{ name: 'siigo_delete_purchase', description: 'Delete a purchase', inputSchema: { type: 'object', properties: { id: { type: 'string', description: 'Purchase ID' }, }, required: ['id'], }, },
- src/index.ts:564-570 (schema)Input schema definition for siigo_delete_purchase tool, specifying an object with required 'id' property of type string.inputSchema: { type: 'object', properties: { id: { type: 'string', description: 'Purchase ID' }, }, required: ['id'], },