Skip to main content
Glama
hlebtkachenko

POHODA MCP Server

pohoda_create_vyroba

Create production documents in POHODA accounting software by specifying date, items, quantities, and descriptions for manufacturing records.

Instructions

Create a production document (výroba) in POHODA

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dateYesDocument date (DD.MM.YYYY or YYYY-MM-DD)
textNoDescription
noteNo
itemsNoProduction items

Implementation Reference

  • Implementation and registration of the 'pohoda_create_vyroba' tool.
    server.tool(
      "pohoda_create_vyroba",
      "Create a production document (výroba) in POHODA",
      {
        date: z.string().describe("Document date (DD.MM.YYYY or YYYY-MM-DD)"),
        text: z.string().optional().describe("Description"),
        note: z.string().optional(),
        items: z.array(z.object({
          text: z.string(),
          quantity: z.number(),
          unitPrice: z.number(),
          unit: z.string().optional(),
          stockCode: z.string().optional(),
        })).optional().describe("Production items"),
      },
      async (params) => {
        try {
          const xml = buildImportDoc({ ico: client.ico }, (item) => {
            const doc = item.ele(NS.vyr, "vyr:vyroba").att("version", "2.0");
            const hdr = doc.ele(NS.vyr, "vyr:vyrobaHeader");
            hdr.ele(NS.vyr, "vyr:date").txt(toIsoDate(params.date));
            if (params.text) hdr.ele(NS.vyr, "vyr:text").txt(params.text);
            if (params.note) hdr.ele(NS.vyr, "vyr:note").txt(params.note);
    
            if (params.items?.length) {
              const det = doc.ele(NS.vyr, "vyr:vyrobaDetail");
              for (const i of params.items) {
                const li = det.ele(NS.vyr, "vyr:vyrobaItem");
                li.ele(NS.vyr, "vyr:text").txt(i.text);
                li.ele(NS.vyr, "vyr:quantity").txt(String(i.quantity));
                if (i.unit) li.ele(NS.vyr, "vyr:unit").txt(i.unit);
                li.ele(NS.vyr, "vyr:homeCurrency").ele(NS.typ, "typ:unitPrice").txt(String(i.unitPrice));
                if (i.stockCode) {
                  li.ele(NS.vyr, "vyr: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(`Production document created. ${result.message}${result.producedId ? ` ID: ${result.producedId}` : ""}`)
            : err(`Failed: ${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?

With no annotations provided, the description bears full responsibility for disclosing behavior but only states the basic creation action. It fails to clarify side effects (e.g., whether this automatically updates stock levels), idempotency, error handling, or what determines a successful creation given the lack of output schema.

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

Conciseness5/5

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

The single-sentence description is maximally efficient with zero redundancy, front-loading the essential verb and object immediately.

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 (4 parameters including nested item objects), absence of annotations, and lack of output schema, the description is insufficient. It omits return value documentation, error scenarios, and POHODA-specific business logic that would help an agent handle failures or confirm successful creation.

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 75% schema coverage, the structured schema already documents most parameters (date, text, items). The description adds no supplemental parameter guidance (e.g., format examples, business rules for items array), meeting the baseline expectation for medium-high schema coverage but not compensating for the undocumented 'note' parameter or nested item fields.

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 identifies the action ('Create') and resource ('production document'/'výroba') within the POHODA system, distinguishing it from sibling list operations (pohoda_list_vyroba) and other document types like invoices or orders. However, it lacks specificity about the business context (e.g., whether this records manufacturing output, material consumption, or assembly).

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 similar creation tools like pohoda_create_prevodka (transfer) or pohoda_create_vydejka (issue), nor does it mention prerequisites such as existing stock items or required permissions.

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