pohoda_list_vydejky
Export dispatch documents from POHODA accounting software by specifying document ID, date range, or last changes filter.
Instructions
Export dispatch documents (výdejky) from POHODA
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | No | Document ID | |
| dateFrom | No | Date from (DD.MM.YYYY or YYYY-MM-DD) | |
| dateTill | No | Date to | |
| lastChanges | No | Only changed after this date |
Implementation Reference
- src/tools/warehouse.ts:136-136 (registration)Registration of the pohoda_list_vydejky tool using the buildWarehouseListTool helper.
buildWarehouseListTool(server, client, "pohoda_list_vydejky", "Export dispatch documents (výdejky) from POHODA", "lst:listVydejkaRequest", "lst:requestVydejka"); - src/tools/warehouse.ts:47-71 (handler)The handler logic for pohoda_list_vydejky (and other list tools) which constructs an XML request, sends it to the Pohoda client, parses the response, and returns the result.
function buildWarehouseListTool( server: McpServer, client: PohodaClient, toolName: string, description: string, listTag: string, requestTag: string, ) { server.tool(toolName, description, listFilterFields, async (params) => { try { const xml = buildExportRequest( { ico: client.ico }, listTag, NS.lst, requestTag, (req) => applyFilter(req, params), ); const resp = parseResponse(await client.sendXml(xml)); const data = extractListData(resp); return jsonResult(description, data, data.length); } catch (e) { return err((e as Error).message); } }); } - src/tools/warehouse.ts:28-33 (schema)Input schema definition for the list tools, including pohoda_list_vydejky.
const listFilterFields = { id: z.number().optional().describe("Document ID"), dateFrom: z.string().optional().describe("Date from (DD.MM.YYYY or YYYY-MM-DD)"), dateTill: z.string().optional().describe("Date to"), lastChanges: z.string().optional().describe("Only changed after this date"), };