delete_collection
Remove a collection and all its documents from Outline wiki to manage content organization.
Instructions
Delete a collection. All documents in the collection will also be deleted.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| collectionId | Yes |
Implementation Reference
- src/lib/handlers/collections.ts:56-62 (handler)The handler function that implements the delete_collection tool logic: checks access permissions and calls the Outline API endpoint '/collections.delete' with the collection ID.async delete_collection(args: DeleteCollectionInput) { checkAccess(config, 'delete_collection'); await apiCall(() => apiClient.post('/collections.delete', { id: args.collectionId }) ); return { success: true, collectionId: args.collectionId, message: MESSAGES.COLLECTION_DELETED }; },
- src/lib/schemas.ts:106-106 (schema)Zod input schema for delete_collection tool, requiring a single 'collectionId' field (validated as UUID via common fragment).export const deleteCollectionSchema = z.object({ collectionId });
- src/lib/schemas.ts:192-192 (schema)TypeScript type definition for DeleteCollectionInput, inferred from the deleteCollectionSchema for type safety in handlers.export type DeleteCollectionInput = z.infer<typeof deleteCollectionSchema>;
- src/lib/tools.ts:157-160 (registration)Tool registration in the allTools array: defines the MCP tool 'delete_collection' with description and references the Zod schema via key.'delete_collection', 'Delete a collection. All documents in the collection will also be deleted.', 'delete_collection' ),
- src/lib/access-control.ts:34-34 (helper)'delete_collection' listed in DELETE_TOOLS set, used by checkAccess/checkDeleteAccess functions called in the handler to enforce permissions.'delete_collection',