Skip to main content
Glama

retell_get_conversation_flow

Retrieve conversation flow configurations to manage AI agent interactions within the Retell AI platform.

Instructions

Retrieve a conversation flow configuration.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
conversation_flow_idYesThe conversation flow ID

Implementation Reference

  • The tool execution handler: switch case that calls the Retell API's get-conversation-flow endpoint using the provided conversation_flow_id argument.
    case "retell_get_conversation_flow":
      return retellRequest(`/get-conversation-flow/${args.conversation_flow_id}`, "GET");
  • Tool definition including name, description, and input schema for MCP tool listing and validation.
    {
      name: "retell_get_conversation_flow",
      description: "Retrieve a conversation flow configuration.",
      inputSchema: {
        type: "object",
        properties: {
          conversation_flow_id: {
            type: "string",
            description: "The conversation flow ID"
          }
        },
        required: ["conversation_flow_id"]
      }
    },
  • Core helper function that performs authenticated HTTP requests to the Retell AI API, implementing the actual network call for this tool.
    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();
    }
  • src/index.ts:1283-1285 (registration)
    MCP server registration for listing all tools, including this one via the 'tools' array.
    server.setRequestHandler(ListToolsRequestSchema, async () => {
      return { tools };
    });

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