Skip to main content
Glama

get_conversation

Retrieve a specific conversation by its ID to access messages and voice memos from Carbon Voice.

Instructions

Get a conversation by its ID.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYes

Implementation Reference

  • src/server.ts:437-460 (registration)
    Registration of the MCP tool 'get_conversation', including description, input schema, and the handler function that executes the logic by calling the simplified Carbon Voice API to fetch the conversation by ID.
    server.registerTool( 'get_conversation', { description: 'Get a conversation by its ID.', inputSchema: getConversationByIdParams.shape, annotations: { readOnlyHint: true, destructiveHint: false, }, }, async (args: GetByIdParams, { authInfo }): Promise<McpToolResponse> => { try { return formatToMCPToolResponse( await simplifiedApi.getConversationById( args.id, setCarbonVoiceAuthHeader(authInfo?.token), ), ); } catch (error) { logger.error('Error getting conversation by id:', { error }); return formatToMCPToolResponse(error); } }, );
  • The handler function for the 'get_conversation' tool, which takes conversation ID, authenticates, calls the API, formats response or error.
    async (args: GetByIdParams, { authInfo }): Promise<McpToolResponse> => { try { return formatToMCPToolResponse( await simplifiedApi.getConversationById( args.id, setCarbonVoiceAuthHeader(authInfo?.token), ), ); } catch (error) { logger.error('Error getting conversation by id:', { error }); return formatToMCPToolResponse(error); } },
  • Zod schema definition for the input parameters of getConversationById, used as inputSchema: getConversationByIdParams.shape in the tool registration. Requires a conversation 'id' string.
    export const getConversationByIdParams = zod.object({ "id": zod.string() })
  • Helper function getConversationById from the generated Carbon Voice Simplified API wrapper, which performs the actual HTTP GET request to retrieve conversation details by ID.
    const getConversationById = ( id: string, options?: SecondParameter<typeof mutator>, ) => { return mutator<Conversation>( { url: `/simplified/conversations/${id}`, method: 'GET' }, 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