Skip to main content
Glama
hlebtkachenko

POHODA MCP Server

pohoda_create_address

Add new contacts or companies to the POHODA address book with required name and optional details like address, ID numbers, and contact information.

Instructions

Create a new address/contact in POHODA addressbook. Requires name; optional fields: street, city, zip, IČO, DIČ, email, phone, web, note.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesCompany or contact name (required)
streetNoStreet address
cityNoCity
zipNoZIP/postal code
icoNoIČO (company ID number)
dicNoDIČ (VAT ID)
emailNoEmail address
phoneNoPhone number
webNoWebsite URL
noteNoNote or comment

Implementation Reference

  • The implementation of 'pohoda_create_address' tool, including its registration, input validation schema using Zod, and the handler function that builds the XML import document and sends it to the POHODA client.
      "pohoda_create_address",
      "Create a new address/contact in POHODA addressbook. Requires name; optional fields: street, city, zip, IČO, DIČ, email, phone, web, note.",
      {
        name: z.string().describe("Company or contact name (required)"),
        street: z.string().optional().describe("Street address"),
        city: z.string().optional().describe("City"),
        zip: z.string().optional().describe("ZIP/postal code"),
        ico: z.string().optional().describe("IČO (company ID number)"),
        dic: z.string().optional().describe("DIČ (VAT ID)"),
        email: z.string().optional().describe("Email address"),
        phone: z.string().optional().describe("Phone number"),
        web: z.string().optional().describe("Website URL"),
        note: z.string().optional().describe("Note or comment"),
      },
      async (params) => {
        try {
          const xml = buildImportDoc({ ico: client.ico }, (item) => {
            const adb = item.ele(NS.adb, "adb:addressbook").att("version", "2.0");
            const header = adb.ele(NS.adb, "adb:addressbookHeader");
            header.ele(NS.adb, "adb:addressbookType").txt("company");
            const identity = header.ele(NS.adb, "adb:identity");
            const typAddr = identity.ele(NS.typ, "typ:address");
            typAddr.ele(NS.typ, "typ:name").txt(params.name);
            if (params.street) typAddr.ele(NS.typ, "typ:street").txt(params.street);
            if (params.city) typAddr.ele(NS.typ, "typ:city").txt(params.city);
            if (params.zip) typAddr.ele(NS.typ, "typ:zip").txt(params.zip);
            if (params.ico) typAddr.ele(NS.typ, "typ:ico").txt(params.ico);
            if (params.dic) typAddr.ele(NS.typ, "typ:dic").txt(params.dic);
            if (params.email) header.ele(NS.adb, "adb:email").txt(params.email);
            if (params.phone) header.ele(NS.adb, "adb:phone").txt(params.phone);
            if (params.web) header.ele(NS.adb, "adb:web").txt(params.web);
            if (params.note) header.ele(NS.adb, "adb:note").txt(params.note);
          });
          const response = await client.sendXml(xml);
          const result = extractImportResult(parseResponse(response));
          return result.success
            ? ok(`Address created successfully. ${result.producedId != null ? `ID: ${result.producedId}` : result.message}`)
            : err(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