get_folder_with_messages
Retrieve a folder and its messages by ID to access conversation content stored in Carbon Voice.
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:665-689 (handler)The registration and inline handler function for the MCP tool 'get_folder_with_messages'. It authenticates using the provided token and calls the generated simplifiedApi.getFolderMessages with the folder ID to retrieve the folder and its direct messages.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); } }, );
- Zod input schema definition for the getFolderMessages API endpoint, used as inputSchema for the tool: requires a folder 'id' string.export const getFolderMessagesParams = zod.object({ "id": zod.string() })
- TypeScript interface GetByIdParams used in the tool handler function arguments, defining the expected input shape { id: string }.export interface GetByIdParams { id: string; }