Skip to main content
Glama
hlebtkachenko

POHODA MCP Server

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
NameRequiredDescriptionDefault
idNoDocument ID
dateFromNoDate from (DD.MM.YYYY or YYYY-MM-DD)
dateTillNoDate to
lastChangesNoOnly changed after this date

Implementation Reference

  • 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");
  • 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);
        }
      });
    }
  • 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"),
    };

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/hlebtkachenko/pohoda-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server