Skip to main content
Glama
hlebtkachenko

POHODA MCP Server

pohoda_delete_address

Remove an address from the POHODA addressbook using its unique ID. This tool deletes specific address records from the accounting system's contact database.

Instructions

Delete an address from POHODA addressbook by ID. Requires the address ID.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesAddress ID to delete (required)

Implementation Reference

  • The implementation of the `pohoda_delete_address` tool, which uses `buildImportDoc` to construct the delete XML request and executes it against the Pohoda client.
    server.tool(
      "pohoda_delete_address",
      "Delete an address from POHODA addressbook by ID. Requires the address ID.",
      {
        id: z.number().describe("Address ID to delete (required)"),
      },
      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 del = actionType.ele(NS.adb, "adb:delete");
            const filter = del.ele(NS.ftr, "ftr:filter");
            filter.ele(NS.ftr, "ftr:id").txt(String(params.id));
          });
          const response = await client.sendXml(xml);
          const result = extractImportResult(parseResponse(response));
          return result.success ? ok(`Address deleted successfully. ${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