pohoda_list_accountancy
Export accountancy records from POHODA software with date-based filtering. Retrieve financial data as JSON for reporting and analysis.
Instructions
List accountancy records from POHODA. Read-only export. Supports filtering by date range or last changes. Returns JSON array of accountancy 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) | |
| lastChanges | No | Filter by last changes date |
Implementation Reference
- src/tools/reports.ts:19-35 (handler)The handler function for the `pohoda_list_accountancy` tool. It builds the XML request, sends it via the client, parses the response, and returns the result as JSON.
async (params) => { try { const xml = buildExportRequest( { ico: client.ico }, "lst:listAccountancyRequest", NS.lst, "lst:requestAccountancy", (req) => applyFilter(req, params) ); const response = await client.sendXml(xml); const parsed = parseResponse(response); const data = extractListData(parsed); return jsonResult("Accountancy", data, Array.isArray(data) ? data.length : 0); } catch (e) { return err((e as Error).message); } } - src/tools/reports.ts:11-18 (registration)Registration of the `pohoda_list_accountancy` tool, including its name, description, and input schema using zod.
server.tool( "pohoda_list_accountancy", "List accountancy records from POHODA. Read-only export. Supports filtering by date range or last changes. Returns JSON array of accountancy 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)"), lastChanges: z.string().optional().describe("Filter by last changes date"), },