Skip to main content
Glama
hlebtkachenko

POHODA MCP Server

pohoda_create_enquiry

Create new enquiries in POHODA accounting software by specifying enquiry type and date, with optional details like partner information, description text, and line items.

Instructions

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

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
enquiryTypeYesEnquiry type: issuedEnquiry or receivedEnquiry (required)
dateYesEnquiry date (DD.MM.YYYY or YYYY-MM-DD)
textNoEnquiry 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

  • Implementation of the pohoda_create_enquiry tool. It builds the XML import document for an enquiry using the provided parameters and sends it to the POHODA client.
    server.tool(
      "pohoda_create_enquiry",
      "Create a new enquiry in POHODA. Requires enquiryType and date. Optional: text, partner details, note, and line items.",
      {
        enquiryType: enquiryTypeEnum.describe("Enquiry type: issuedEnquiry or receivedEnquiry (required)"),
        date: z.string().describe("Enquiry date (DD.MM.YYYY or YYYY-MM-DD)"),
        text: z.string().optional().describe("Enquiry 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(enquiryItemSchema)
          .optional()
          .describe("Line items: text, quantity, unitPrice, rateVAT (none|low|high), optional unit"),
      },
      async (params) => {
        try {
          const xml = buildImportDoc({ ico: client.ico }, (item) => {
            const enq = item.ele(NS.enq, "enq:enquiry").att("version", "2.0");
            const header = enq.ele(NS.enq, "enq:enquiryHeader");
    
            header.ele(NS.enq, "enq:enquiryType").txt(params.enquiryType);
            header.ele(NS.enq, "enq:date").txt(toIsoDate(params.date));
            if (params.text) header.ele(NS.enq, "enq:text").txt(params.text);
    
            const hasPartner =
              params.partnerName ?? params.partnerStreet ?? params.partnerCity ?? params.partnerZip ?? params.partnerIco;
            if (hasPartner) {
              const identity = header.ele(NS.enq, "enq: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.enq, "enq:note").txt(params.note);
    
            if (params.items && params.items.length > 0) {
              const detail = enq.ele(NS.enq, "enq:enquiryDetail");
              for (const it of params.items) {
                const enqItem = detail.ele(NS.enq, "enq:enquiryItem");
                enqItem.ele(NS.enq, "enq:text").txt(it.text);
                enqItem.ele(NS.enq, "enq:quantity").txt(String(it.quantity));
                enqItem.ele(NS.enq, "enq:rateVAT").txt(it.rateVAT);
                enqItem
                  .ele(NS.enq, "enq:homeCurrency")
                  .ele(NS.typ, "typ:unitPrice")
                  .txt(String(it.unitPrice));
                if (it.unit) enqItem.ele(NS.enq, "enq:unit").txt(it.unit);
              }
            }
          });
          const response = await client.sendXml(xml);
          const result = extractImportResult(parseResponse(response));
          return result.success
            ? ok(
                `Enquiry 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?

No annotations are provided, so the description carries the full burden. While it indicates a create operation, it fails to disclose what the tool returns, error handling behavior, idempotency characteristics, or POHODA-specific side effects. The mutation risk is implied but not explicit.

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 two-sentence structure. The first sentence establishes the core action and resource, while the second logically groups required versus optional parameters. No redundant or wasted language.

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?

For a 10-parameter creation tool with no annotations or output schema, the description covers the minimum viable information (action, required fields, optional fields). However, it lacks POHODA-specific context (e.g., what distinguishes an enquiry from other documents) and return value documentation, leaving significant gaps for agent decision-making.

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 semantic grouping by categorizing 'partner details' (covering 5 separate fields) and 'line items' as optional groups, which aids comprehension beyond the flat schema structure, though it doesn't explain parameter formats or validation rules beyond what's in the schema.

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 'Create a new enquiry in POHODA' with a specific verb and resource. However, it does not differentiate from sibling creation tools like pohoda_create_offer or pohoda_create_order, which could help an agent understand when to use an enquiry versus other document types in the POHODA system.

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., pohoda_create_offer for formal price quotes). It only lists parameter requirements without explaining use cases, prerequisites, or exclusion criteria.

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