Skip to main content
Glama

retell_update_chat_agent

Modify chat agent settings like display name and webhook URL to adjust AI conversation behavior and integration points.

Instructions

Update a chat agent's configuration.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
agent_idYesThe chat agent ID to update
agent_nameNoNew display name
webhook_urlNoNew webhook URL

Implementation Reference

  • Handler logic for retell_update_chat_agent: extracts agent_id, destructures remaining args as update data, and makes a PATCH request to Retell API endpoint /update-chat-agent/{agent_id}
    case "retell_update_chat_agent": { const { agent_id: chatAgentId, ...chatAgentUpdateData } = args; return retellRequest(`/update-chat-agent/${chatAgentId}`, "PATCH", chatAgentUpdateData as Record<string, unknown>); }
  • Tool definition including name, description, and input schema (JSON Schema) for validating arguments: requires agent_id, optional agent_name and webhook_url
    { name: "retell_update_chat_agent", description: "Update a chat agent's configuration.", inputSchema: { type: "object", properties: { agent_id: { type: "string", description: "The chat agent ID to update" }, agent_name: { type: "string", description: "New display name" }, webhook_url: { type: "string", description: "New webhook URL" } }, required: ["agent_id"] } },
  • src/index.ts:1283-1285 (registration)
    MCP server registration for listing tools, which exposes the retell_update_chat_agent schema via the static tools array
    server.setRequestHandler(ListToolsRequestSchema, async () => { return { tools }; });
  • src/index.ts:1287-1313 (registration)
    MCP server registration for calling tools, which dispatches to executeTool switch statement containing the handler case for retell_update_chat_agent
    // Register tool execution handler server.setRequestHandler(CallToolRequestSchema, async (request) => { const { name, arguments: args } = request.params; try { const result = await executeTool(name, args as Record<string, unknown>); return { content: [ { type: "text", text: JSON.stringify(result, null, 2), }, ], }; } catch (error) { const errorMessage = error instanceof Error ? error.message : String(error); return { content: [ { type: "text", text: `Error: ${errorMessage}`, }, ], isError: true, }; } });
  • Generic helper function for making authenticated HTTP requests to Retell AI API, 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