Skip to main content
Glama
hlebtkachenko

POHODA MCP Server

pohoda_create_contract

Create new contracts in POHODA accounting software by specifying contract details, partner information, and optional notes to manage business agreements.

Instructions

Create a new contract in POHODA. Optional: number, datePlan, text, partner details, note.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
numberNoContract number
datePlanNoPlanned date (DD.MM.YYYY or YYYY-MM-DD)
textNoContract text/description
partnerNameNoPartner company name
partnerStreetNoPartner street
partnerCityNoPartner city
partnerZipNoPartner ZIP code
partnerIcoNoPartner IČO
noteNoNote

Implementation Reference

  • The handler for 'pohoda_create_contract' tool, which constructs the XML import request for a new contract using the provided parameters and sends it to the POHODA client.
    server.tool(
      "pohoda_create_contract",
      "Create a new contract in POHODA. Optional: number, datePlan, text, partner details, note.",
      {
        number: z.string().optional().describe("Contract number"),
        datePlan: z.string().optional().describe("Planned date (DD.MM.YYYY or YYYY-MM-DD)"),
        text: z.string().optional().describe("Contract 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"),
        note: z.string().optional().describe("Note"),
      },
      async (params) => {
        try {
          const xml = buildImportDoc({ ico: client.ico }, (item) => {
            const con = item.ele(NS.con, "con:contract").att("version", "2.0");
            const desc = con.ele(NS.con, "con:contractDesc");
    
            if (params.number) desc.ele(NS.con, "con:number").txt(params.number);
            if (params.datePlan) desc.ele(NS.con, "con:datePlan").txt(toIsoDate(params.datePlan));
            if (params.text) desc.ele(NS.con, "con:text").txt(params.text);
    
            const hasPartner =
              params.partnerName ?? params.partnerStreet ?? params.partnerCity ?? params.partnerZip ?? params.partnerIco;
            if (hasPartner) {
              const identity = desc.ele(NS.con, "con: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.note) desc.ele(NS.con, "con:note").txt(params.note);
          });
          const response = await client.sendXml(xml);
          const result = extractImportResult(parseResponse(response));
          return result.success
            ? ok(
                `Contract 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?

With no annotations provided, the description bears full responsibility for behavioral disclosure. It states 'Create' implying mutation, but fails to disclose idempotency characteristics, validation rules (e.g., uniqueness constraints on contract numbers), error handling, or what the tool returns on success (e.g., the created contract ID).

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 compact with two front-loaded sentences. The first establishes purpose; the second lists optional fields. While efficient, the second sentence partially duplicates schema information that is already fully documented.

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 9 optional parameters with no required fields, the description should clarify what constitutes a minimal valid contract. It lacks explanation of return values (critical since no output schema exists) and omits business logic context such as whether duplicate contract numbers are rejected or if partners are auto-created.

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 adds minimal semantic value by grouping partner fields as 'partner details' and noting they are optional, but does not explain parameter formats beyond what the schema already provides (e.g., date formats are in the schema descriptions).

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 action ('Create') and resource ('contract') within the POHODA system. It distinguishes from sibling tools like pohoda_create_invoice or pohoda_create_order by specifying 'contract', though it could further clarify what type of contract (e.g., sales, purchase) to be a 5.

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 mentions which fields are optional but provides no guidance on when to use this tool versus pohoda_create_order or pohoda_create_offer, nor does it specify prerequisites (e.g., whether the partner must exist beforehand or if this creates a draft vs. finalized contract).

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