siigo_get_purchases
Retrieve purchase records from Siigo accounting software to monitor expenses, track vendor transactions, and manage procurement data.
Instructions
Get list of purchases from Siigo
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| page | No | Page number | |
| page_size | No | Number of items per page |
Implementation Reference
- src/siigo-client.ts:155-157 (handler)Core implementation of the tool: makes authenticated GET request to Siigo /v1/purchases endpoint with optional pagination params.async getPurchases(params?: { page?: number; page_size?: number }): Promise<SiigoApiResponse<any>> { return this.makeRequest<any>('GET', '/v1/purchases', undefined, params); }
- src/index.ts:1006-1009 (handler)MCP tool handler wrapper: calls SiigoClient.getPurchases and formats the response as MCP content.private async handleGetPurchases(args: any) { const result = await this.siigoClient.getPurchases(args); return { content: [{ type: 'text', text: JSON.stringify(result, null, 2) }] }; }
- src/index.ts:516-526 (registration)Tool registration in the list returned by ListToolsRequestHandler, including name, description, and input schema.{ name: 'siigo_get_purchases', description: 'Get list of purchases from Siigo', inputSchema: { type: 'object', properties: { page: { type: 'number', description: 'Page number' }, page_size: { type: 'number', description: 'Number of items per page' }, }, }, },
- src/index.ts:115-116 (handler)Dispatch case in CallToolRequestHandler switch statement that routes to the specific handler.case 'siigo_get_purchases': return await this.handleGetPurchases(args);