delete-domain
Delete a domain by its UUID. Supports hard delete for permanent removal and recursive delete for child domains.
Instructions
Delete a domain by UUID
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | Domain UUID to delete | |
| hardDelete | No | Hard delete (permanent) vs soft delete | |
| recursive | No | Recursively delete children |
Implementation Reference
- src/tools/domains.ts:83-89 (handler)The deleteDomain handler function that executes the tool logic - validates write permissions and sends a DELETE request to /domains/:id with hardDelete and recursive query params.
export async function deleteDomain(params: z.infer<typeof deleteDomainSchema>) { assertWriteAllowed(); return omClient.delete(`/domains/${params.id}`, { hardDelete: params.hardDelete, recursive: params.recursive, }); } - src/tools/domains.ts:77-81 (schema)The deleteDomainSchema Zod schema defining input parameters: id (string, required), hardDelete (boolean, optional, default false), recursive (boolean, optional, default false).
export const deleteDomainSchema = z.object({ id: z.string().describe("Domain UUID to delete"), hardDelete: z.boolean().optional().default(false).describe("Hard delete (permanent) vs soft delete"), recursive: z.boolean().optional().default(false).describe("Recursively delete children"), }); - src/index.ts:341-341 (registration)Registration of the delete-domain tool with MCP server, wired to deleteDomainSchema and deleteDomain handler.
tool("delete-domain", "Delete a domain by UUID", deleteDomainSchema.shape, wrapToolHandler(deleteDomain)); - src/tools/domains.ts:1-3 (helper)Imports used by deleteDomain: zod for schema validation, omClient for HTTP calls, and assertWriteAllowed for permission checking.
import { z } from "zod/v4"; import { omClient } from "../client.js"; import { assertWriteAllowed } from "./utils.js"; - src/index.ts:92-99 (registration)Import statement that brings deleteDomainSchema and deleteDomain from src/tools/domains.ts into the registration file.
import { listDomainsSchema, listDomains, getDomainSchema, getDomain, getDomainByNameSchema, getDomainByName, createDomainSchema, createDomain, updateDomainSchema, updateDomain, deleteDomainSchema, deleteDomain, listDataProductsSchema, listDataProducts, getDataProductSchema, getDataProduct, getDataProductByNameSchema, getDataProductByName, createDataProductSchema, createDataProduct, updateDataProductSchema, updateDataProduct, deleteDataProductSchema, deleteDataProduct, } from "./tools/domains.js";