Skip to main content
Glama
hlebtkachenko

POHODA MCP Server

pohoda_delete_order

Delete an order from POHODA accounting software by specifying its ID. This tool removes order records to maintain accurate data management.

Instructions

Delete an order from POHODA by ID. Requires the order ID.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesOrder ID to delete (required)

Implementation Reference

  • The handler and registration logic for the 'pohoda_delete_order' tool. It uses buildImportDoc to create a deletion XML request containing an actionType set to 'delete' and a filter with the ID, then sends it to the POHODA client.
    server.tool(
      "pohoda_delete_order",
      "Delete an order from POHODA by ID. Requires the order ID.",
      {
        id: z.number().describe("Order ID to delete (required)"),
      },
      async (params) => {
        try {
          const xml = buildImportDoc({ ico: client.ico }, (item) => {
            const ord = item.ele(NS.ord, "ord:order").att("version", "2.0");
            const actionType = ord.ele(NS.ord, "ord:actionType");
            const del = actionType.ele(NS.ord, "ord: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(`Order 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