Skip to main content
Glama

retell_get_chat

Retrieve details of a specific chat session by providing its unique identifier to access conversation data and manage interactions.

Instructions

Retrieve details of a specific chat session.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
chat_idYesThe unique identifier of the chat to retrieve

Implementation Reference

  • The switch case handler that executes the retell_get_chat tool by calling the retellRequest helper with the appropriate GET endpoint using the provided chat_id.
    case "retell_get_chat": return retellRequest(`/get-chat/${args.chat_id}`, "GET");
  • src/index.ts:248-261 (registration)
    Registration of the retell_get_chat tool in the tools array, including name, description, and input schema. This array is returned by the MCP list tools handler.
    { name: "retell_get_chat", description: "Retrieve details of a specific chat session.", inputSchema: { type: "object", properties: { chat_id: { type: "string", description: "The unique identifier of the chat to retrieve" } }, required: ["chat_id"] } },
  • Input schema defining the expected parameters (chat_id: string) for the retell_get_chat tool.
    inputSchema: { type: "object", properties: { chat_id: { type: "string", description: "The unique identifier of the chat to retrieve" } }, required: ["chat_id"] }
  • Supporting utility function that performs the actual HTTP request to the Retell API, handling authentication, JSON serialization, error handling, and response parsing. Used by the tool handler.
    async function retellRequest( endpoint: string, method: string = "GET", body?: Record<string, unknown> ): Promise<unknown> { const apiKey = getApiKey(); const headers: Record<string, string> = { "Authorization": `Bearer ${apiKey}`, "Content-Type": "application/json", }; const options: RequestInit = { method, headers, }; if (body && method !== "GET") { options.body = JSON.stringify(body); } const response = await fetch(`${RETELL_API_BASE}${endpoint}`, options); if (!response.ok) { const errorText = await response.text(); throw new Error(`Retell API error (${response.status}): ${errorText}`); } // Handle 204 No Content if (response.status === 204) { return { success: true }; } return response.json(); }

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/itsanamune/retellsimp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server