Skip to main content
Glama
hlebtkachenko

POHODA MCP Server

pohoda_create_service

Create service records in POHODA accounting software by specifying date, description, partner name, and notes for maintenance tracking.

Instructions

Create a service record in POHODA

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dateYesService date
textNoDescription
partnerNameNo
noteNo

Implementation Reference

  • The `pohoda_create_service` tool is defined here using the `server.tool` method, with input validation via `zod` and the handler logic that constructs the XML import request using `buildImportDoc` and submits it via `client.sendXml`.
    server.tool(
      "pohoda_create_service",
      "Create a service record in POHODA",
      {
        date: z.string().describe("Service date"),
        text: z.string().optional().describe("Description"),
        partnerName: z.string().optional(),
        note: z.string().optional(),
      },
      async (params) => {
        try {
          const xml = buildImportDoc({ ico: client.ico }, (item) => {
            const doc = item.ele(NS.ser, "ser:service").att("version", "2.0");
            const hdr = doc.ele(NS.ser, "ser:serviceHeader");
            hdr.ele(NS.ser, "ser:date").txt(toIsoDate(params.date));
            if (params.text) hdr.ele(NS.ser, "ser:text").txt(params.text);
            if (params.partnerName) {
              const pi = hdr.ele(NS.ser, "ser:partnerIdentity");
              pi.ele(NS.typ, "typ:address").ele(NS.typ, "typ:name").txt(params.partnerName);
            }
            if (params.note) hdr.ele(NS.ser, "ser:note").txt(params.note);
          });
          const resp = parseResponse(await client.sendXml(xml));
          const result = extractImportResult(resp);
          return result.success
            ? ok(`Service record created. ${result.message}${result.producedId ? ` ID: ${result.producedId}` : ""}`)
            : err(`Failed: ${result.message}`);
        } catch (e) {
          return err((e as Error).message);
        }
      },
    );

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