Skip to main content
Glama

retell_get_agent_versions

Retrieve version history for a Retell AI agent to track changes, manage updates, and revert to previous configurations when needed.

Instructions

Retrieve the version history of an agent.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
agent_idYesThe agent ID to get versions for

Implementation Reference

  • Handler implementation in the executeTool switch statement. Makes a GET request to the Retell API endpoint `/get-agent-versions/{agent_id}` using the retellRequest helper.
    case "retell_get_agent_versions": return retellRequest(`/get-agent-versions/${args.agent_id}`, "GET");
  • Input schema definition for the tool, requiring an 'agent_id' string parameter.
    inputSchema: { type: "object", properties: { agent_id: { type: "string", description: "The agent ID to get versions for" } }, required: ["agent_id"] }
  • src/index.ts:592-605 (registration)
    Tool registration in the 'tools' array used by the MCP server's listTools handler.
    { name: "retell_get_agent_versions", description: "Retrieve the version history of an agent.", inputSchema: { type: "object", properties: { agent_id: { type: "string", description: "The agent ID to get versions for" } }, required: ["agent_id"] } },
  • Generic retellRequest helper function used by all Retell API tools to make authenticated HTTP requests.
    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