delete-topic
Delete a topic by providing its UUID. Choose between soft or hard delete, and optionally remove child topics recursively.
Instructions
Delete a topic by UUID
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | Topic UUID to delete | |
| hardDelete | No | Hard delete (permanent) vs soft delete | |
| recursive | No | Recursively delete children |
Implementation Reference
- src/tools/topics.ts:84-88 (schema)Zod schema for delete-topic: validates id (UUID), hardDelete (boolean, default false), and recursive (boolean, default false).
export const deleteTopicSchema = z.object({ id: z.string().describe("Topic 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/tools/topics.ts:90-96 (handler)Handler function for delete-topic: asserts write permission, then calls omClient.delete on /topics/{id} with hardDelete and recursive query params.
export async function deleteTopic(params: z.infer<typeof deleteTopicSchema>) { assertWriteAllowed(); return omClient.delete(`/topics/${params.id}`, { hardDelete: params.hardDelete, recursive: params.recursive, }); } - src/index.ts:288-288 (registration)Tool registration: tool("delete-topic", "Delete a topic by UUID", deleteTopicSchema.shape, wrapToolHandler(deleteTopic)).
tool("delete-topic", "Delete a topic by UUID", deleteTopicSchema.shape, wrapToolHandler(deleteTopic));