Skip to main content
Glama
hlebtkachenko

POHODA MCP Server

pohoda_update_stock

Modify inventory item details in POHODA accounting software. Update product names, prices, units, VAT rates, and notes to maintain accurate stock records.

Instructions

Update an existing stock/inventory item in POHODA

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idNoStock item ID to update
codeNoStock code to identify item (alternative to id)
nameNoNew name
unitNoNew unit
purchasingPriceNoNew purchasing price
sellingPriceNoNew selling price
rateVATNoNew VAT rate
noteNoNew note

Implementation Reference

  • Handler and registration for the 'pohoda_update_stock' tool. It constructs an XML request using 'buildImportDoc' to send an update command to the Pohoda client based on provided stock item parameters.
    server.tool(
      "pohoda_update_stock",
      "Update an existing stock/inventory item in POHODA",
      {
        id: z.number().optional().describe("Stock item ID to update"),
        code: z.string().optional().describe("Stock code to identify item (alternative to id)"),
        name: z.string().optional().describe("New name"),
        unit: z.string().optional().describe("New unit"),
        purchasingPrice: z.number().optional().describe("New purchasing price"),
        sellingPrice: z.number().optional().describe("New selling price"),
        rateVAT: z.enum(["none", "low", "high"]).optional().describe("New VAT rate"),
        note: z.string().optional().describe("New note"),
      },
      async (params) => {
        try {
          if (!params.id && !params.code) return err("Either id or code is required to identify the stock item.");
          const xml = buildImportDoc({ ico: client.ico }, (item) => {
            const stk = item.ele(NS.stk, "stk:stock").att("version", "2.0");
            const act = stk.ele(NS.stk, "stk:actionType").ele(NS.stk, "stk:update");
            const ftr = act.ele(NS.ftr, "ftr:filter");
            if (params.id != null) ftr.ele(NS.ftr, "ftr:id").txt(String(params.id));
            else if (params.code) ftr.ele(NS.ftr, "ftr:code").txt(params.code);
            const hdr = stk.ele(NS.stk, "stk:stockHeader");
            if (params.name) hdr.ele(NS.stk, "stk:name").txt(params.name);
            if (params.unit) hdr.ele(NS.stk, "stk:unit").txt(params.unit);
            if (params.purchasingPrice != null) hdr.ele(NS.stk, "stk:purchasingPrice").txt(String(params.purchasingPrice));
            if (params.sellingPrice != null) hdr.ele(NS.stk, "stk:sellingPrice").txt(String(params.sellingPrice));
            if (params.rateVAT) hdr.ele(NS.stk, "stk:rateVAT").txt(params.rateVAT);
            if (params.note) hdr.ele(NS.stk, "stk:note").txt(params.note);
          });
          const resp = parseResponse(await client.sendXml(xml));
          const result = extractImportResult(resp);
          return result.success ? ok(`Stock item updated. ${result.message}`) : 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?

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the mutation intent ('Update') but fails to clarify whether partial updates are supported (fields omitted are preserved vs cleared), whether the operation is idempotent, or what response to expect. No safety warnings or permission requirements are mentioned.

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 redundant words. However, given the tool's complexity (8 parameters, no annotations, mutation behavior), it may be overly brief to the point of under-specification, though it avoids the tautology of simply restating the tool name.

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 mutation tool with 8 parameters, no annotations, and no output schema, the description is inadequate. It omits critical operational context such as the dual identification mechanism (id vs code), partial update behavior, and success/failure indicators. The mention of 'POHODA' provides system context but insufficient operational detail.

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 schema adequately documents all 8 parameters. The description adds no semantic information beyond the schema (e.g., explaining that 'id' and 'code' are alternative identifiers, or detailing the VAT rate enum values), warranting the baseline score of 3.

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 uses a specific verb ('Update') and resource ('stock/inventory item') and includes the context 'existing' which implicitly distinguishes it from sibling pohoda_create_stock. However, it does not explicitly differentiate from other siblings like pohoda_delete_stock or mention the POHODA system context beyond the tool name.

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., create vs update), nor does it explain the prerequisite that either 'id' or 'code' must be provided to identify the target item, or that these are mutually exclusive identification methods.

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