Skip to main content
Glama
hlebtkachenko

POHODA MCP Server

pohoda_list_stock

Export inventory items from POHODA accounting software with filters for ID, code, name, store, or recent changes.

Instructions

Export stock/inventory items from POHODA with optional filters

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idNoStock item ID
codeNoStock code (supports wildcards *)
nameNoStock item name
storeNoStore name filter
lastChangesNoOnly items changed after this date

Implementation Reference

  • The handler and registration for 'pohoda_list_stock' tool. It constructs a XML request to list stock items from POHODA and processes the response.
    server.tool(
      "pohoda_list_stock",
      "Export stock/inventory items from POHODA with optional filters",
      {
        id: z.number().optional().describe("Stock item ID"),
        code: z.string().optional().describe("Stock code (supports wildcards *)"),
        name: z.string().optional().describe("Stock item name"),
        store: z.string().optional().describe("Store name filter"),
        lastChanges: z.string().optional().describe("Only items changed after this date"),
      },
      async (params) => {
        try {
          const xml = buildExportRequest(
            { ico: client.ico },
            "lst:listStockRequest",
            NS.lStk,
            "lst:requestStock",
            (req) => {
              const hasFilter = Object.values(params).some((v) => v != null);
              if (!hasFilter) return;
              const ftr = req.ele(NS.ftr, "ftr:filter");
              if (params.id != null) ftr.ele(NS.ftr, "ftr:id").txt(String(params.id));
              if (params.code) ftr.ele(NS.ftr, "ftr:code").txt(params.code);
              if (params.name) ftr.ele(NS.ftr, "ftr:name").txt(params.name);
              if (params.store) ftr.ele(NS.ftr, "ftr:store").ele(NS.typ, "typ:ids").txt(params.store);
              if (params.lastChanges) ftr.ele(NS.ftr, "ftr:lastChanges").txt(toIsoDate(params.lastChanges));
            },
          );
          const resp = parseResponse(await client.sendXml(xml));
          const data = extractListData(resp);
          return jsonResult("Stock items", data, data.length);
        } catch (e) {
          return err((e as Error).message);
        }
      },

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