Skip to main content
Glama
hlebtkachenko

POHODA MCP Server

pohoda_create_prodejka

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

Instructions

Create a sales document (prodejka) 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 tool "pohoda_create_prodejka" is registered by calling buildWarehouseCreateTool in registerWarehouseTools.
    buildWarehouseCreateTool(server, client, "pohoda_create_prodejka", "Create a sales document (prodejka) in POHODA", NS.pro, "pro", "prodejka", "prodejkaHeader", "prodejkaDetail", "prodejkaItem");
  • The handler logic for creating a document, used by "pohoda_create_prodejka" via buildWarehouseCreateTool.
      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 input schema for creating a document, used by "pohoda_create_prodejka".
    {
      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"),
    },
Behavior2/5

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

No annotations provided, so description carries full burden. While 'Create' implies a write operation, there's no disclosure of side effects (stock movements?), idempotency, error handling, or return values. The presence of 'stockCode' in items suggests inventory impact that isn't mentioned.

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

Conciseness3/5

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

The single sentence contains no waste, but for a 9-parameter financial document creation tool with nested line items, it is underspecified rather than appropriately concise. Front-loading is moot given the minimal length.

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?

Inadequate for the complexity: creating a sales document with partner data and line items requires explanation of the document lifecycle, VAT handling (rateVAT enum), stock integration, and return format. No output schema exists to compensate for the terse description.

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 coverage is only 44% (low), with partner fields (partnerName, partnerStreet, partnerCity, partnerZip, partnerIco) lacking descriptions. The description adds no semantic context for these undocumented fields nor explains the relationship between 'text' and 'note' parameters or required business logic.

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 states the action ('Create'), resource ('sales document/prodejka'), and target system ('POHODA'). It identifies the specific document type 'prodejka' distinguishing it from sibling tools like pohoda_create_invoice, though it doesn't explain what differentiates a prodejka from other sales documents.

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 alternatives like pohoda_create_invoice, pohoda_create_offer, or pohoda_create_voucher. No prerequisites mentioned (e.g., whether partner data creates new records or references existing ones).

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