get_folder_with_messages
Retrieve a folder and its associated messages by specifying the folder ID. Use this tool to access and organize messages stored in the Carbon Voice MCP server.
Instructions
Get a folder including its messages by its ID. (Only messages at folder level are returned.)
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes |
Implementation Reference
- src/server.ts:676-688 (handler)Handler function that executes the tool logic by calling the simplified API's getFolderMessages method with the provided folder ID and authentication header, formatting the response or error.async (args: GetByIdParams, { authInfo }): Promise<McpToolResponse> => { try { return formatToMCPToolResponse( await simplifiedApi.getFolderMessages( args.id, setCarbonVoiceAuthHeader(authInfo?.token), ), ); } catch (error) { logger.error('Error getting folder with messages:', { error }); return formatToMCPToolResponse(error); } },
- Input schema definition (Zod) for the get_folder_with_messages tool, requiring a folder 'id' string parameter.export const getFolderMessagesParams = zod.object({ "id": zod.string() })
- src/server.ts:665-689 (registration)Registration of the 'get_folder_with_messages' MCP tool, including description, input schema reference, annotations, and inline handler.server.registerTool( 'get_folder_with_messages', { description: 'Get a folder including its messages by its ID. (Only messages at folder level are returned.)', inputSchema: getFolderMessagesParams.shape, annotations: { readOnlyHint: true, destructiveHint: false, }, }, async (args: GetByIdParams, { authInfo }): Promise<McpToolResponse> => { try { return formatToMCPToolResponse( await simplifiedApi.getFolderMessages( args.id, setCarbonVoiceAuthHeader(authInfo?.token), ), ); } catch (error) { logger.error('Error getting folder with messages:', { error }); return formatToMCPToolResponse(error); } }, );