Skip to main content
Glama
hlebtkachenko

POHODA MCP Server

pohoda_delete_contract

Delete a contract from POHODA accounting software by specifying its unique ID. This tool removes contracts from the system when they are no longer needed.

Instructions

Delete a contract from POHODA by ID. Requires the contract ID.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesContract ID to delete (required)

Implementation Reference

  • Implementation and registration of the 'pohoda_delete_contract' tool.
    server.tool(
      "pohoda_delete_contract",
      "Delete a contract from POHODA by ID. Requires the contract ID.",
      {
        id: z.number().describe("Contract ID to delete (required)"),
      },
      async (params) => {
        try {
          const xml = buildImportDoc({ ico: client.ico }, (item) => {
            const con = item.ele(NS.con, "con:contract").att("version", "2.0");
            const actionType = con.ele(NS.con, "con:actionType");
            const del = actionType.ele(NS.con, "con: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(`Contract 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