Skip to main content
Glama
hlebtkachenko

POHODA MCP Server

pohoda_create_offer

Create new issued or received offers in POHODA accounting software. Specify offer type, date, partner details, line items, and notes to generate offers.

Instructions

Create a new offer in POHODA. Requires offerType and date. Optional: text, partner details, note, and line items.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
offerTypeYesOffer type: issuedOffer or receivedOffer (required)
dateYesOffer date (DD.MM.YYYY or YYYY-MM-DD)
textNoOffer text/description
partnerNameNoPartner company name
partnerStreetNoPartner street
partnerCityNoPartner city
partnerZipNoPartner ZIP code
partnerIcoNoPartner IČO
noteNoNote
itemsNoLine items: text, quantity, unitPrice, rateVAT (none|low|high), optional unit

Implementation Reference

  • Handler function for pohoda_create_offer that constructs XML and sends it to the Pohoda client.
    async (params) => {
      try {
        const xml = buildImportDoc({ ico: client.ico }, (item) => {
          const ofr = item.ele(NS.ofr, "ofr:offer").att("version", "2.0");
          const header = ofr.ele(NS.ofr, "ofr:offerHeader");
    
          header.ele(NS.ofr, "ofr:offerType").txt(params.offerType);
          header.ele(NS.ofr, "ofr:date").txt(toIsoDate(params.date));
          if (params.text) header.ele(NS.ofr, "ofr:text").txt(params.text);
    
          const hasPartner =
            params.partnerName ?? params.partnerStreet ?? params.partnerCity ?? params.partnerZip ?? params.partnerIco;
          if (hasPartner) {
            const identity = header.ele(NS.ofr, "ofr: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) header.ele(NS.ofr, "ofr:note").txt(params.note);
    
          if (params.items && params.items.length > 0) {
            const detail = ofr.ele(NS.ofr, "ofr:offerDetail");
            for (const it of params.items) {
              const ofrItem = detail.ele(NS.ofr, "ofr:offerItem");
              ofrItem.ele(NS.ofr, "ofr:text").txt(it.text);
              ofrItem.ele(NS.ofr, "ofr:quantity").txt(String(it.quantity));
              ofrItem.ele(NS.ofr, "ofr:rateVAT").txt(it.rateVAT);
              ofrItem
                .ele(NS.ofr, "ofr:homeCurrency")
                .ele(NS.typ, "typ:unitPrice")
                .txt(String(it.unitPrice));
              if (it.unit) ofrItem.ele(NS.ofr, "ofr:unit").txt(it.unit);
            }
          }
        });
        const response = await client.sendXml(xml);
        const result = extractImportResult(parseResponse(response));
        return result.success
          ? ok(
              `Offer created successfully.${result.producedId != null ? ` ID: ${result.producedId}` : ""} ${result.message}`
            )
          : err(result.message);
      } catch (e) {
        return err((e as Error).message);
      }
    }
  • Input validation schema for pohoda_create_offer tool parameters.
    {
      offerType: offerTypeEnum.describe("Offer type: issuedOffer or receivedOffer (required)"),
      date: z.string().describe("Offer date (DD.MM.YYYY or YYYY-MM-DD)"),
      text: z.string().optional().describe("Offer 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"),
      items: z
        .array(offerItemSchema)
        .optional()
        .describe("Line items: text, quantity, unitPrice, rateVAT (none|low|high), optional unit"),
    },
  • Tool registration for pohoda_create_offer.
    server.tool(
      "pohoda_create_offer",
      "Create a new offer in POHODA. Requires offerType and date. Optional: text, partner details, note, and line items.",
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries full burden. It implies mutation via 'Create' but discloses no side effects, idempotency characteristics, rate limits, or return value format. For a 10-parameter creation tool with nested line items, this is insufficient behavioral disclosure.

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?

Extremely efficient at two sentences. Front-loads the core action, follows with requirement constraints, and efficiently bundles optional parameters. No redundant or wasted words.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Adequate for a creation tool with good schema coverage: mentions required/optional split and captures all parameter categories. However, lacks return value description (critical since no output schema exists) and POHODA-specific behavioral context expected when annotations are absent.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

While schema has 100% description coverage, the description adds value by grouping the five partner-related fields (partnerName, partnerStreet, etc.) under the conceptual label 'partner details' and explicitly highlighting the two required fields. This semantic grouping aids agent comprehension beyond raw schema 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?

States specific verb 'Create' and resource 'offer' in system 'POHODA'. However, it fails to differentiate from siblings like 'pohoda_create_enquiry' or 'pohoda_create_order' which are similar pre-sale documents, leaving the agent to guess which creation tool is appropriate.

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 this tool versus alternatives like create_enquiry or create_order. No prerequisites (authentication, permissions) or error conditions are mentioned. Only lists required vs optional fields, which is parameter documentation, not usage guidance.

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