list_conversations
Retrieve a summary of recent conversations from the Carbon Voice platform to review message history and communication threads.
Instructions
List all conversations. Returns a simplified view of user conversations that have had messages sent or received within the last 6 months.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/server.ts:411-435 (registration)Registration of the MCP tool 'list_conversations' including its description, empty input schema (z.object({}).shape), annotations, and inline handler function that calls simplifiedApi.getAllConversations with authentication.server.registerTool( 'list_conversations', { description: 'List all conversations. ' + 'Returns a simplified view of user conversations that have had messages sent or received within the last 6 months.', inputSchema: z.object({}).shape, annotations: { readOnlyHint: true, destructiveHint: false, }, }, async (args: unknown, { authInfo }): Promise<McpToolResponse> => { try { return formatToMCPToolResponse( await simplifiedApi.getAllConversations( setCarbonVoiceAuthHeader(authInfo?.token), ), ); } catch (error) { logger.error('Error listing conversations:', { error }); return formatToMCPToolResponse(error); } }, );
- src/server.ts:423-433 (handler)The handler function for the 'list_conversations' tool. It takes no input args, uses authInfo to set headers, calls the generated simplifiedApi.getAllConversations(), formats the response, and handles errors.async (args: unknown, { authInfo }): Promise<McpToolResponse> => { try { return formatToMCPToolResponse( await simplifiedApi.getAllConversations( setCarbonVoiceAuthHeader(authInfo?.token), ), ); } catch (error) { logger.error('Error listing conversations:', { error }); return formatToMCPToolResponse(error); }
- src/server.ts:417-417 (schema)Inline Zod input schema for the tool, which is empty object since no parameters are required.inputSchema: z.object({}).shape,
- Generated helper function getAllConversations in the simplified API client that performs a GET request to /simplified/conversations/all to retrieve conversations./** * @summary Get all user conversations (Only _id and name available */ const getAllConversations = (options?: SecondParameter<typeof mutator>) => { return mutator<AllConversationsResponse>( { url: `/simplified/conversations/all`, method: 'GET' }, options, ); };