Skip to main content
Glama
hlebtkachenko

POHODA MCP Server

pohoda_create_prevodka

Create transfer documents in POHODA accounting software by specifying date, partner details, and line items with quantities and prices.

Instructions

Create a transfer document (převodka) 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 constructing the XML and calling the Pohoda API. The `pohoda_create_prevodka` tool is an instance of this factory.
    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);
          }
        },
      );
    }
  • Registration of the `pohoda_create_prevodka` tool using the `buildWarehouseCreateTool` factory within `registerWarehouseTools`.
      buildWarehouseCreateTool(server, client, "pohoda_create_prevodka", "Create a transfer document (převodka) in POHODA", NS.pre, "pre", "prevodka", "prevodkaHeader", "prevodkaDetail", "prevodkaItem");
    }
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It fails to mention mutation effects (stock level changes), idempotency, error handling, or whether the operation is atomic. The description only implies a write operation through the word 'Create' without detailing side effects.

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 extremely concise with zero redundancy. However, given the tool's complexity (9 parameters including nested financial items), it is arguably undersized rather than appropriately concise. Every word earns its place, but there aren't enough of them.

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 financial document creation tool with nested line items (quantity, unitPrice, rateVAT) and no output schema or annotations, the single-sentence description is inadequate. It misses critical context: document numbering, warehouse selection, currency handling, and confirmation of successful creation.

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 only 44% (low), with critical parameters like partnerName, partnerIco, and most item sub-properties lacking descriptions. The description adds no parameter context, failing to compensate for the schema gaps. It doesn't explain the relationship between items, stockCode, or the VAT rate enum values.

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 verb (Create) and the specific document type (transfer document/převodka). It distinguishes from siblings by explicitly naming the Czech document type 'převodka', which differentiates it from similar warehouse tools like create_prijemka or create_vydejka. However, it fails to explain what a převodka actually represents (e.g., internal warehouse transfer).

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?

No guidance provided on when to use this tool versus similar warehouse document tools (create_prijemka, create_vydejka, create_vyroba). No mention of prerequisites, required setup, or business rules (e.g., whether both source and target warehouses must be specified).

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