Skip to main content
Glama

get_conversation

Retrieve a specific conversation by its ID using the Carbon Voice MCP server, enabling efficient access to messaging data for review or analysis.

Instructions

Get a conversation by its ID.

Input Schema

NameRequiredDescriptionDefault
idYes

Input Schema (JSON Schema)

{ "$schema": "http://json-schema.org/draft-07/schema#", "additionalProperties": false, "properties": { "id": { "type": "string" } }, "required": [ "id" ], "type": "object" }

Implementation Reference

  • src/server.ts:437-460 (registration)
    Registers the 'get_conversation' MCP tool, including description, input schema (getConversationByIdParams), annotations, and the handler function that authenticates and calls simplifiedApi.getConversationById.
    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 that executes the logic: extracts id from args, sets auth header, calls simplifiedApi.getConversationById, 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 getConversationByIdParams: an object with required 'id' string field, used for input validation in the tool.
    export const getConversationByIdParams = zod.object({ "id": zod.string() })
  • Generated API helper function getConversationById that performs a GET request to `/simplified/conversations/${id}` returning a Conversation object, called by the tool handler.
    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