Skip to main content
Glama

retell_create_chat_completion

Send a message in an existing chat session and receive the AI agent's response to continue the conversation.

Instructions

Send a message in an existing chat session and get the agent's response.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
chat_idYesThe chat session ID
contentYesThe message content to send

Implementation Reference

  • Handler logic within the executeTool switch statement that dispatches the tool call to Retell AI's /create-chat-completion endpoint via POST request using the shared retellRequest helper.
    case "retell_create_chat_completion":
      return retellRequest("/create-chat-completion", "POST", args);
  • Input schema defining the parameters for the retell_create_chat_completion tool: required chat_id (string) and content (string).
    inputSchema: {
      type: "object",
      properties: {
        chat_id: {
          type: "string",
          description: "The chat session ID"
        },
        content: {
          type: "string",
          description: "The message content to send"
        }
      },
      required: ["chat_id", "content"]
    }
  • src/index.ts:262-279 (registration)
    Tool registration in the tools array, including name, description, and input schema, which is provided to MCP clients via ListToolsRequest.
    {
      name: "retell_create_chat_completion",
      description: "Send a message in an existing chat session and get the agent's response.",
      inputSchema: {
        type: "object",
        properties: {
          chat_id: {
            type: "string",
            description: "The chat session ID"
          },
          content: {
            type: "string",
            description: "The message content to send"
          }
        },
        required: ["chat_id", "content"]
      }
    },
  • Generic helper function for making authenticated HTTP requests to the Retell AI API, used by all tool handlers including retell_create_chat_completion.
    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();
    }
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden of behavioral disclosure. While it mentions sending a message and getting a response, it lacks critical details: whether this is a read-only or mutating operation, authentication requirements, rate limits, response format, error handling, or whether the chat session must be active. For a tool with no annotation coverage, this is inadequate.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that directly states the tool's function. It's front-loaded with the core action and outcome, with no unnecessary words or redundancy. Every part of the sentence earns its place.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the complexity of a chat interaction tool with no annotations and no output schema, the description is insufficient. It doesn't explain the response format, error conditions, or behavioral traits like whether the tool is idempotent or has side effects. For a tool that likely involves network calls and agent interactions, more context is needed.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 100% description coverage, with clear documentation for both parameters (chat_id and content). The description doesn't add any semantic details beyond what the schema provides, such as format examples or constraints. With high schema coverage, the baseline score of 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: 'Send a message in an existing chat session and get the agent's response.' It specifies the action (send message), resource (existing chat session), and outcome (get agent's response). However, it doesn't explicitly differentiate from sibling tools like 'retell_create_chat' or 'retell_end_chat', which would require a 5.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites (e.g., needing an existing chat session), exclusions (e.g., not for creating new chats), or compare it to related tools like 'retell_create_chat' for starting chats or 'retell_end_chat' for ending them.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other 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