Skip to main content
Glama
hlebtkachenko

POHODA MCP Server

pohoda_update_address

Modify address details in the POHODA addressbook by ID. Update fields like name, street, city, contact information, and business identifiers.

Instructions

Update an existing address in POHODA addressbook by ID. Provide id (required) and any fields to update: name, street, city, zip, ico, dic, email, phone, web, note.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesAddress ID to update (required)
nameNoCompany or contact name
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 handler function that constructs the XML and performs the POHODA update request.
    async (params) => {
      try {
        const xml = buildImportDoc({ ico: client.ico }, (item) => {
          const adb = item.ele(NS.adb, "adb:addressbook").att("version", "2.0");
          const actionType = adb.ele(NS.adb, "adb:actionType");
          const update = actionType.ele(NS.adb, "adb:update");
          const filter = update.ele(NS.ftr, "ftr:filter");
          filter.ele(NS.ftr, "ftr:id").txt(String(params.id));
          const header = adb.ele(NS.adb, "adb:addressbookHeader");
          const hasIdentity =
            params.name ?? params.street ?? params.city ?? params.zip ?? params.ico ?? params.dic;
          if (hasIdentity) {
            header.ele(NS.adb, "adb:addressbookType").txt("company");
            const identity = header.ele(NS.adb, "adb:identity");
            const typAddr = identity.ele(NS.typ, "typ:address");
            if (params.name) 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 updated successfully. ${result.message}`) : err(result.message);
      } catch (e) {
        return err((e as Error).message);
      }
    }
  • Input schema definition for the pohoda_update_address tool.
    {
      id: z.number().describe("Address ID to update (required)"),
      name: z.string().optional().describe("Company or contact name"),
      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"),
    },
  • Registration of the pohoda_update_address tool.
    server.tool(
      "pohoda_update_address",
      "Update an existing address in POHODA addressbook by ID. Provide id (required) and any fields to update: name, street, city, zip, ico, dic, email, phone, web, note.",

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