Skip to main content
Glama
hlebtkachenko

POHODA MCP Server

pohoda_create_prijemka

Create receiving documents in POHODA accounting software by specifying date, partner details, and item information for inventory management.

Instructions

Create a receiving document (příjemka) in POHODA

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dateYesDocument date (DD.MM.YYYY or YYYY-MM-DD)
textNoDocument text
noteNoNote
partnerNameNo
partnerStreetNo
partnerCityNo
partnerZipNo
partnerIcoNo
itemsNoLine items

Implementation Reference

  • The `buildWarehouseCreateTool` function is a generic factory for creating Pohoda documents, which handles the logic for creating a 'prijemka' when called.
    function buildWarehouseCreateTool(
      server: McpServer,
      client: PohodaClient,
      toolName: string,
      description: string,
      ns: string,
      prefix: string,
      docTag: string,
      headerTag: string,
      detailTag: string,
      itemTag: string,
    ) {
      server.tool(
        toolName,
        description,
        {
          date: z.string().describe("Document date (DD.MM.YYYY or YYYY-MM-DD)"),
          text: z.string().optional().describe("Document text"),
          note: z.string().optional().describe("Note"),
          ...partnerFields,
          items: z.array(itemSchema).optional().describe("Line items"),
        },
        async (params) => {
          try {
            const xml = buildImportDoc({ ico: client.ico }, (item) => {
              const doc = item.ele(ns, `${prefix}:${docTag}`).att("version", "2.0");
              const hdr = doc.ele(ns, `${prefix}:${headerTag}`);
              hdr.ele(ns, `${prefix}:date`).txt(toIsoDate(params.date));
              if (params.text) hdr.ele(ns, `${prefix}:text`).txt(params.text);
              addPartner(hdr, prefix, ns, params);
              if (params.note) hdr.ele(ns, `${prefix}:note`).txt(params.note);
    
              if (params.items?.length) {
                const det = doc.ele(ns, `${prefix}:${detailTag}`);
                for (const i of params.items) {
                  const li = det.ele(ns, `${prefix}:${itemTag}`);
                  li.ele(ns, `${prefix}:text`).txt(i.text);
                  li.ele(ns, `${prefix}:quantity`).txt(String(i.quantity));
                  if (i.unit) li.ele(ns, `${prefix}:unit`).txt(i.unit);
                  if (i.rateVAT) li.ele(ns, `${prefix}:rateVAT`).txt(i.rateVAT);
                  li.ele(ns, `${prefix}:homeCurrency`).ele(NS.typ, "typ:unitPrice").txt(String(i.unitPrice));
                  if (i.stockCode) {
                    li.ele(ns, `${prefix}:stockItem`).ele(NS.typ, "typ:stockItem").ele(NS.typ, "typ:ids").txt(i.stockCode);
                  }
                }
              }
            });
            const resp = parseResponse(await client.sendXml(xml));
            const result = extractImportResult(resp);
            return result.success
              ? ok(`Document created. ${result.message}${result.producedId ? ` ID: ${result.producedId}` : ""}`)
              : err(`Failed: ${result.message}`);
          } catch (e) {
            return err((e as Error).message);
          }
        },
      );
    }
  • The tool `pohoda_create_prijemka` is registered by calling `buildWarehouseCreateTool` in `registerWarehouseTools`.
    buildWarehouseCreateTool(server, client, "pohoda_create_prijemka", "Create a receiving document (příjemka) in POHODA", NS.pri, "pri", "prijemka", "prijemkaHeader", "prijemkaDetail", "prijemkaItem");
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries full burden. While 'Create' implies a write operation, the description fails to disclose whether this affects stock levels, generates accounting entries, requires existing partners, or handles duplicates/idempotency.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single efficient sentence with no redundancy. However, given the tool's complexity (9 parameters, nested objects, financial document creation), it is underspecified rather than optimally concise.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a complex mutation tool involving inventory documents with line items and partner data, the description is inadequate. It lacks output schema, annotations, and any explanation of side effects, return values, or error conditions necessary for safe invocation.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 44% (low), with partner fields and most item fields undocumented. The description adds no compensatory context for these parameters, nor does it explain the expected format for nested items or the relationship between partner fields and the document.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action (Create), resource (receiving document/příjemka), and system (POHODA). It translates the Czech term 'příjemka' which aids understanding. However, it does not explain how this differs from sibling creation tools like pohoda_create_vydejka or pohoda_create_prodejka.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives (e.g., pohoda_create_prevodka for transfers or pohoda_create_prodejka for sales). It mentions no prerequisites, business logic (inventory receipt), or conditions for use.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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