delete_folder
Remove folders and their contents from Carbon Voice by ID. This action permanently deletes nested folders and all messages within them.
Instructions
Delete a folder by its ID. Deleting a folder will also delete nested folders and all the messages in referenced folders. (This is a destructive action and cannot be undone, so please be careful.)
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes |
Implementation Reference
- src/server.ts:720-745 (registration)Registration of the 'delete_folder' MCP tool, including schema reference, annotations (destructive), and handler that invokes simplifiedApi.deleteFolderserver.registerTool( 'delete_folder', { description: 'Delete a folder by its ID. Deleting a folder will also delete nested folders and all the messages in referenced folders. ' + '(This is a destructive action and cannot be undone, so please be careful.)', inputSchema: deleteFolderParams.shape, annotations: { readOnlyHint: false, destructiveHint: true, }, }, async (args: GetByIdParams, { authInfo }): Promise<McpToolResponse> => { try { return formatToMCPToolResponse( await simplifiedApi.deleteFolder( args.id, setCarbonVoiceAuthHeader(authInfo?.token), ), ); } catch (error) { logger.error('Error deleting folder:', { error }); return formatToMCPToolResponse(error); } }, );
- Zod input schema for delete_folder tool: requires a string 'id' for the folder to delete.export const deleteFolderParams = zod.object({ "id": zod.string() })
- Core handler function in generated API that performs the HTTP DELETE request to delete the folder and its contents.const deleteFolder = ( id: string, options?: SecondParameter<typeof mutator>, ) => { return mutator<void>( { url: `/simplified/folders/${id}`, method: 'DELETE' }, options, ); };