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.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"id": "<id>"
},
"name": "pohoda_delete_contract"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | Contract ID to delete (required) |
Implementation Reference
- src/tools/contracts.ts:101-123 (handler)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); } } );