Skip to main content
Glama
hlebtkachenko

POHODA MCP Server

pohoda_delete_stock

Remove inventory items from POHODA accounting software by specifying the item ID or stock code. This tool deletes stock records from the system.

Instructions

Delete a stock/inventory item from POHODA

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idNoStock item ID
codeNoStock code

Implementation Reference

  • The `pohoda_delete_stock` tool handler, defined using `server.tool`, takes `id` or `code` as input, constructs an XML request with the `stk:delete` action, and processes the result.
    server.tool(
      "pohoda_delete_stock",
      "Delete a stock/inventory item from POHODA",
      { id: z.number().optional().describe("Stock item ID"), code: z.string().optional().describe("Stock code") },
      async (params) => {
        try {
          if (!params.id && !params.code) return err("Either id or code is required.");
          const xml = buildImportDoc({ ico: client.ico }, (item) => {
            const stk = item.ele(NS.stk, "stk:stock").att("version", "2.0");
            const del = stk.ele(NS.stk, "stk:actionType").ele(NS.stk, "stk:delete");
            const ftr = del.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 resp = parseResponse(await client.sendXml(xml));
          const result = extractImportResult(resp);
          return result.success ? ok(`Stock item deleted. ${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 provided, so description carries full burden. While 'Delete' implies destruction, it lacks critical safety context: irreversibility warnings, what happens if the item is referenced by other records, cascading effects, or success/failure behavior. For a destructive operation, this is a significant gap.

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?

Single sentence, seven words. Action-oriented, front-loaded with the verb, zero waste. Appropriate length for the information provided.

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 a destructive operation with optional identifiers. No output schema exists, yet the description omits return value indicators, prerequisite checks (item existence), and the identifier selection logic. Should specify if deletion is permanent and whether id or code is preferred.

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 coverage is 100% with clear descriptions for both 'id' and 'code'. Description adds no explicit parameter guidance, meeting the baseline for high schema coverage. However, it fails to explain the unusual case where both identifier parameters are optional (required: 0).

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Specific verb 'Delete' with clear resource 'stock/inventory item' and system context 'POHODA'. Clearly distinguishes from sibling create/update/list stock tools and other delete operations (address, contract, etc.) through the resource 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?

Provides no guidance on when to use versus alternatives, nor does it clarify the critical parameter relationship: both 'id' and 'code' are optional in the schema, but the description doesn't explain whether one is sufficient, both are required, or which takes precedence.

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