move_message_to_folder
Move voicememo or prerecorded messages to a specified folder or workspace using their unique IDs. Organize and manage your Carbon Voice messages efficiently.
Instructions
Move a message to a folder by its ID. Move a Message into another Folder or into a Workspace. Only allowed to move messages of type: voicememo,prerecorded.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| folder_id | No | Folder ID | |
| message_id | Yes | Only allowed to add messages of type: voicememo,prerecorded | |
| workspace_id | No | Workspace ID |
Input Schema (JSON Schema)
{
"$schema": "http://json-schema.org/draft-07/schema#",
"additionalProperties": false,
"properties": {
"folder_id": {
"description": "Folder ID",
"type": "string"
},
"message_id": {
"description": "Only allowed to add messages of type: voicememo,prerecorded",
"type": "string"
},
"workspace_id": {
"description": "Workspace ID",
"type": "string"
}
},
"required": [
"message_id"
],
"type": "object"
}
Implementation Reference
- src/server.ts:786-801 (handler)The handler function that executes the tool logic by calling the generated Carbon Voice API simplifiedApi.addMessageToFolderOrWorkspace with auth.async ( args: AddMessageToFolderPayload, { authInfo }, ): Promise<McpToolResponse> => { try { return formatToMCPToolResponse( await simplifiedApi.addMessageToFolderOrWorkspace( args, setCarbonVoiceAuthHeader(authInfo?.token), ), ); } catch (error) { logger.error('Error moving message to folder:', { error }); return formatToMCPToolResponse(error); } },
- Zod schema defining the input parameters for moving a message to a folder or workspace: message_id (required), workspace_id (optional), folder_id (optional). Used as inputSchema in registration.export const addMessageToFolderOrWorkspaceBody = zod.object({ "message_id": zod.string().describe('Only allowed to add messages of type: voicememo,prerecorded'), "workspace_id": zod.string().optional().describe('Workspace ID'), "folder_id": zod.string().optional().describe('Folder ID') })
- src/server.ts:774-802 (registration)MCP tool registration for 'move_message_to_folder' including description, input schema reference, annotations, and inline handler function.server.registerTool( 'move_message_to_folder', { description: 'Move a message to a folder by its ID. Move a Message into another Folder or into a Workspace. ' + 'Only allowed to move messages of type: voicememo,prerecorded.', inputSchema: addMessageToFolderOrWorkspaceBody.shape, annotations: { readOnlyHint: false, destructiveHint: false, }, }, async ( args: AddMessageToFolderPayload, { authInfo }, ): Promise<McpToolResponse> => { try { return formatToMCPToolResponse( await simplifiedApi.addMessageToFolderOrWorkspace( args, setCarbonVoiceAuthHeader(authInfo?.token), ), ); } catch (error) { logger.error('Error moving message to folder:', { error }); return formatToMCPToolResponse(error); } }, );