Skip to main content
Glama
hlebtkachenko

POHODA MCP Server

pohoda_create_stock

Add new inventory items to POHODA accounting software by specifying code, name, pricing, VAT rates, and stock details for accurate inventory management.

Instructions

Create a new stock/inventory item in POHODA

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
codeYesUnique stock code
nameYesStock item name
stockTypeNoStock type (default: card)
unitNoUnit of measure (e.g., ks, kg, m)
purchasingPriceNoPurchasing price
sellingPriceNoSelling price without VAT
sellingPriceVATNoSelling price with VAT
rateVATNoVAT rate
storeNoStore name
noteNoNote
descriptionNoExtended description
quantityNoInitial quantity

Implementation Reference

  • The implementation of the `pohoda_create_stock` tool handler, including schema definition and XML construction logic.
    server.tool(
      "pohoda_create_stock",
      "Create a new stock/inventory item in POHODA",
      {
        code: z.string().describe("Unique stock code"),
        name: z.string().describe("Stock item name"),
        stockType: z.enum(["card", "text", "service", "kit", "set"]).optional().describe("Stock type (default: card)"),
        unit: z.string().optional().describe("Unit of measure (e.g., ks, kg, m)"),
        purchasingPrice: z.number().optional().describe("Purchasing price"),
        sellingPrice: z.number().optional().describe("Selling price without VAT"),
        sellingPriceVAT: z.number().optional().describe("Selling price with VAT"),
        rateVAT: z.enum(["none", "low", "high"]).optional().describe("VAT rate"),
        store: z.string().optional().describe("Store name"),
        note: z.string().optional().describe("Note"),
        description: z.string().optional().describe("Extended description"),
        quantity: z.number().optional().describe("Initial quantity"),
      },
      async (params) => {
        try {
          const xml = buildImportDoc({ ico: client.ico }, (item) => {
            const stk = item.ele(NS.stk, "stk:stock").att("version", "2.0");
            const hdr = stk.ele(NS.stk, "stk:stockHeader");
            hdr.ele(NS.stk, "stk:stockType").txt(params.stockType ?? "card");
            hdr.ele(NS.stk, "stk:code").txt(params.code);
            hdr.ele(NS.stk, "stk:name").txt(params.name);
            if (params.unit) hdr.ele(NS.stk, "stk:unit").txt(params.unit);
            if (params.store) hdr.ele(NS.stk, "stk:storage").ele(NS.typ, "typ:ids").txt(params.store);
            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.sellingPriceVAT != null) hdr.ele(NS.stk, "stk:sellingPriceVAT").txt(String(params.sellingPriceVAT));
            if (params.rateVAT) hdr.ele(NS.stk, "stk:rateVAT").txt(params.rateVAT);
            if (params.quantity != null) hdr.ele(NS.stk, "stk:count").txt(String(params.quantity));
            if (params.description) hdr.ele(NS.stk, "stk:description").txt(params.description);
            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 created. ${result.message}${result.producedId ? ` ID: ${result.producedId}` : ""}`)
            : err(`Failed to create stock item: ${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 carries the full burden of behavioral disclosure. It states the mutation intent ('Create') but fails to disclose idempotency behavior (what happens if code already exists), error handling, side effects, or whether the operation is atomic. Only the basic action type is conveyed.

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 description consists of a single efficient sentence with no redundancy. However, for a 12-parameter mutation tool with no annotations, this brevity results in underspecification rather than effective conciseness—critical context is omitted due to excessive terseness.

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, mutation operation, no output schema, no annotations), the description is insufficient. It lacks error behavior documentation, return value description, and business logic constraints necessary for safe invocation of a data-modification operation.

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?

Schema description coverage is 100%, establishing a baseline of 3. The description mentions no parameters specifically, nor does it add semantic context about validation rules, parameter relationships (e.g., sellingPrice vs sellingPriceVAT exclusivity), or business logic. It relies entirely on the schema documentation.

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 resource (stock/inventory item) with domain context (POHODA). It distinguishes from siblings like pohoda_delete_stock and pohoda_list_stock through the specific action/resource combination, though it doesn't differentiate from other create_* tools beyond naming the resource type.

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_update_stock (for existing items) or prerequisites such as whether the store must exist beforehand. The description offers no 'when-not-to-use' or prerequisite information.

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