Skip to main content
Glama
hlebtkachenko

POHODA MCP Server

pohoda_create_order

Create new sales or purchase orders in POHODA accounting software by specifying order type, date, partner details, and line items.

Instructions

Create a new order in POHODA. Requires orderType and date. Optional: numberOrder, text, partner details, note, and line items.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
orderTypeYesOrder type: issuedOrder or receivedOrder (required)
dateYesOrder date (DD.MM.YYYY or YYYY-MM-DD)
numberOrderNoOrder number
textNoOrder text/description
partnerNameNoPartner company name
partnerStreetNoPartner street
partnerCityNoPartner city
partnerZipNoPartner ZIP code
partnerIcoNoPartner IČO
partnerDicNoPartner DIČ
noteNoNote
itemsNoLine items: text, quantity, unitPrice, rateVAT (none|low|high), optional unit, code

Implementation Reference

  • Tool definition and implementation of 'pohoda_create_order'. It constructs an XML document and sends it to the POHODA client.
    server.tool(
      "pohoda_create_order",
      "Create a new order in POHODA. Requires orderType and date. Optional: numberOrder, text, partner details, note, and line items.",
      {
        orderType: orderTypeEnum.describe("Order type: issuedOrder or receivedOrder (required)"),
        date: z.string().describe("Order date (DD.MM.YYYY or YYYY-MM-DD)"),
        numberOrder: z.string().optional().describe("Order number"),
        text: z.string().optional().describe("Order text/description"),
        partnerName: z.string().optional().describe("Partner company name"),
        partnerStreet: z.string().optional().describe("Partner street"),
        partnerCity: z.string().optional().describe("Partner city"),
        partnerZip: z.string().optional().describe("Partner ZIP code"),
        partnerIco: z.string().optional().describe("Partner IČO"),
        partnerDic: z.string().optional().describe("Partner DIČ"),
        note: z.string().optional().describe("Note"),
        items: z
          .array(orderItemSchema)
          .optional()
          .describe("Line items: text, quantity, unitPrice, rateVAT (none|low|high), optional unit, code"),
      },
      async (params) => {
        try {
          const xml = buildImportDoc({ ico: client.ico }, (item) => {
            const ord = item.ele(NS.ord, "ord:order").att("version", "2.0");
            const header = ord.ele(NS.ord, "ord:orderHeader");
    
            header.ele(NS.ord, "ord:orderType").txt(params.orderType);
            header.ele(NS.ord, "ord:date").txt(toIsoDate(params.date));
            if (params.numberOrder) header.ele(NS.ord, "ord:numberOrder").txt(params.numberOrder);
            if (params.text) header.ele(NS.ord, "ord:text").txt(params.text);
    
            const hasPartner =
              params.partnerName ??
              params.partnerStreet ??
              params.partnerCity ??
              params.partnerZip ??
              params.partnerIco ??
              params.partnerDic;
            if (hasPartner) {
              const identity = header.ele(NS.ord, "ord:partnerIdentity");
              const typAddr = identity.ele(NS.typ, "typ:address");
              if (params.partnerName) typAddr.ele(NS.typ, "typ:name").txt(params.partnerName);
              if (params.partnerStreet) typAddr.ele(NS.typ, "typ:street").txt(params.partnerStreet);
              if (params.partnerCity) typAddr.ele(NS.typ, "typ:city").txt(params.partnerCity);
              if (params.partnerZip) typAddr.ele(NS.typ, "typ:zip").txt(params.partnerZip);
              if (params.partnerIco) typAddr.ele(NS.typ, "typ:ico").txt(params.partnerIco);
              if (params.partnerDic) typAddr.ele(NS.typ, "typ:dic").txt(params.partnerDic);
            }
    
            if (params.note) header.ele(NS.ord, "ord:note").txt(params.note);
    
            if (params.items && params.items.length > 0) {
              const detail = ord.ele(NS.ord, "ord:orderDetail");
              for (const it of params.items) {
                const ordItem = detail.ele(NS.ord, "ord:orderItem");
                ordItem.ele(NS.ord, "ord:text").txt(it.text);
                ordItem.ele(NS.ord, "ord:quantity").txt(String(it.quantity));
                ordItem.ele(NS.ord, "ord:rateVAT").txt(it.rateVAT);
                ordItem
                  .ele(NS.ord, "ord:homeCurrency")
                  .ele(NS.typ, "typ:unitPrice")
                  .txt(String(it.unitPrice));
                if (it.unit) ordItem.ele(NS.ord, "ord:unit").txt(it.unit);
                if (it.code) ordItem.ele(NS.ord, "ord:code").txt(it.code);
              }
            }
          });
          const response = await client.sendXml(xml);
          const result = extractImportResult(parseResponse(response));
          return result.success
            ? ok(
                `Order created successfully.${result.producedId != null ? ` ID: ${result.producedId}` : ""} ${result.message}`
              )
            : err(result.message);
        } catch (e) {
          return err((e as Error).message);
        }
      }
    );
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. While 'Create' implies a write operation, the description fails to disclose idempotency behavior, validation rules (e.g., duplicate order numbers), return values, or side effects. For a mutation tool with 12 parameters including nested line items, this is insufficient behavioral transparency.

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 that front-loads the primary action. It avoids redundancy with the schema while conveying essential parameter categorization. However, the dense string of optional fields could benefit from formatting or grouping for improved readability.

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?

Given the tool's complexity—12 parameters including a nested items array with 6 sub-properties, and no output schema or annotations—the description is inadequate. It lacks explanation of return values, error scenarios (e.g., invalid VAT rates), business logic constraints, or the distinction between issuedOrder and receivedOrder business contexts.

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

Parameters3/5

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

With 100% schema description coverage, the baseline is appropriately 3. The description adds value by categorizing parameters as required versus optional, which aids agent decision-making. However, it groups specific schema fields under vague terms like 'partner details' and 'line items' without elaborating on the nested structure that the schema reveals.

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 'Create a new order in POHODA' with specific verb (create) and resource (order). It distinguishes from sibling tools like create_invoice or create_offer by explicitly naming 'order' as the target entity, though it could better clarify the business distinction between orders and similar documents like offers or enquiries.

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 identifies required fields (orderType, date) and optional fields, but provides no guidance on when to use this tool versus similar creation tools like pohoda_create_offer or pohoda_create_enquiry. It also omits prerequisites such as whether the partner must exist beforehand or if order numbers must be unique.

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