delete-classification
Delete a tag classification by UUID. Supports hard delete and recursive deletion of children.
Instructions
Delete a tag classification
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | Classification UUID to delete | |
| hardDelete | No | Hard delete (permanent) vs soft delete | |
| recursive | No | Recursively delete children |
Implementation Reference
- src/tools/tags.ts:55-61 (handler)The handler function that executes delete-classification logic. Calls assertWriteAllowed(), then sends a DELETE request to /classifications/{id} with hardDelete and recursive params.
export async function deleteClassification(params: z.infer<typeof deleteClassificationSchema>) { assertWriteAllowed(); return omClient.delete(`/classifications/${params.id}`, { hardDelete: params.hardDelete, recursive: params.recursive, }); } - src/tools/tags.ts:49-53 (schema)Zod schema for delete-classification input: id (string), hardDelete (optional boolean, default false), recursive (optional boolean, default false).
export const deleteClassificationSchema = z.object({ id: z.string().describe("Classification 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:323-323 (registration)Registration of the delete-classification tool using tool() with its schema and wrapped handler.
tool("delete-classification", "Delete a tag classification", deleteClassificationSchema.shape, wrapToolHandler(deleteClassification));