Skip to main content
Glama
PhononX

Carbon Voice

by PhononX

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
NameRequiredDescriptionDefault
idYes

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.deleteFolder
    server.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,
      );
    };

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/PhononX/cv-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server