siigo_get_purchase
Retrieve specific purchase details by ID from Siigo accounting software to track transactions and manage financial records.
Instructions
Get a specific purchase by ID
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | Purchase ID |
Implementation Reference
- src/index.ts:1011-1014 (handler)MCP tool handler that delegates to SiigoClient.getPurchase(id) and returns formatted JSON response.private async handleGetPurchase(args: any) { const result = await this.siigoClient.getPurchase(args.id); return { content: [{ type: 'text', text: JSON.stringify(result, null, 2) }] }; }
- src/index.ts:527-537 (schema)Tool registration including input schema definition requiring a 'Purchase ID' string.{ name: 'siigo_get_purchase', description: 'Get a specific purchase by ID', inputSchema: { type: 'object', properties: { id: { type: 'string', description: 'Purchase ID' }, }, required: ['id'], }, },
- src/index.ts:117-118 (registration)Dispatch switch case that registers and routes 'siigo_get_purchase' tool calls to its handler.case 'siigo_get_purchase': return await this.handleGetPurchase(args);
- src/siigo-client.ts:159-161 (helper)Siigo API client method implementing the GET request to retrieve a specific purchase by ID.async getPurchase(id: string): Promise<SiigoApiResponse<any>> { return this.makeRequest<any>('GET', `/v1/purchases/${id}`); }