pohoda_list_balance
Retrieve balance records from POHODA accounting software. Filter by date range to export financial data as JSON for analysis and reporting.
Instructions
List balance records from POHODA. Read-only export. Supports filtering by date range. Returns JSON array of balance records.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| dateFrom | No | Filter from date (DD.MM.YYYY or YYYY-MM-DD) | |
| dateTill | No | Filter till date (DD.MM.YYYY or YYYY-MM-DD) |
Implementation Reference
- src/tools/reports.ts:38-62 (handler)Implementation of the `pohoda_list_balance` MCP tool handler in `src/tools/reports.ts`.
server.tool( "pohoda_list_balance", "List balance records from POHODA. Read-only export. Supports filtering by date range. Returns JSON array of balance records.", { dateFrom: z.string().optional().describe("Filter from date (DD.MM.YYYY or YYYY-MM-DD)"), dateTill: z.string().optional().describe("Filter till date (DD.MM.YYYY or YYYY-MM-DD)"), }, async (params) => { try { const xml = buildExportRequest( { ico: client.ico }, "lst:listBalanceRequest", NS.lst, "lst:requestBalance", (req) => applyFilter(req, params) ); const response = await client.sendXml(xml); const parsed = parseResponse(response); const data = extractListData(parsed); return jsonResult("Balance", data, Array.isArray(data) ? data.length : 0); } catch (e) { return err((e as Error).message); } } );