Skip to main content
Glama

retell_create_sms_chat

Start an outbound SMS conversation using a specified chat agent. Initiate automated SMS chats by providing sender and recipient phone numbers along with the agent ID to handle the conversation.

Instructions

Start an outbound SMS conversation using a specified chat agent.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
from_numberYesThe sender's phone number in E.164 format
to_numberYesThe recipient's phone number in E.164 format
agent_idYesThe chat agent ID to handle the conversation
metadataNoOptional: Custom metadata for the SMS chat

Implementation Reference

  • Handler case in executeTool function that implements the tool logic by calling retellRequest to POST to /create-sms-chat endpoint with input args.
    case "retell_create_sms_chat":
      return retellRequest("/create-sms-chat", "POST", args);
  • Tool schema definition including name, description, and inputSchema with required parameters from_number, to_number, agent_id.
    {
      name: "retell_create_sms_chat",
      description: "Start an outbound SMS conversation using a specified chat agent.",
      inputSchema: {
        type: "object",
        properties: {
          from_number: {
            type: "string",
            description: "The sender's phone number in E.164 format"
          },
          to_number: {
            type: "string",
            description: "The recipient's phone number in E.164 format"
          },
          agent_id: {
            type: "string",
            description: "The chat agent ID to handle the conversation"
          },
          metadata: {
            type: "object",
            description: "Optional: Custom metadata for the SMS chat"
          }
        },
        required: ["from_number", "to_number", "agent_id"]
      }
    },
  • src/index.ts:1283-1285 (registration)
    MCP server handler for listing tools, which returns the tools array containing the retell_create_sms_chat tool definition.
    server.setRequestHandler(ListToolsRequestSchema, async () => {
      return { tools };
    });
  • src/index.ts:1288-1313 (registration)
    MCP server handler for calling tools, which invokes executeTool(name, args) dispatching to the specific handler case.
    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,
        };
      }
    });
  • Helper function used by all tool handlers to make authenticated HTTP requests to the Retell AI API.
    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?

With no annotations provided, the description carries the full burden of behavioral disclosure. It states the tool initiates an SMS conversation but fails to describe key behaviors: whether this is a one-time message or starts an ongoing chat, what permissions or authentication are required, potential rate limits, or the expected outcome (e.g., does it return a chat ID?). This leaves significant gaps for an agent to understand how the tool operates.

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 purpose without any redundant or extraneous information. It is front-loaded with the core action, making it easy to parse quickly, and every word contributes to understanding the tool's function.

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 initiating an SMS conversation (a write operation with no output schema and no annotations), the description is incomplete. It lacks details on behavioral aspects like authentication needs, error handling, or what the tool returns, which are crucial for an agent to use it effectively. The high schema coverage helps with parameters, but overall context is insufficient for a mutation tool.

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, clearly documenting all parameters (e.g., phone numbers in E.164 format, agent ID, optional metadata). The description adds no additional semantic context beyond what the schema provides, such as examples or constraints on metadata. Given the high schema coverage, a baseline score of 3 is appropriate, as the schema handles the heavy lifting.

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 action ('Start an outbound SMS conversation') and the resource ('using a specified chat agent'), making the purpose specific and understandable. However, it doesn't explicitly differentiate from sibling tools like 'retell_create_phone_call' or 'retell_create_chat', which involve different communication channels or contexts, leaving some ambiguity about when to choose SMS over other options.

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, such as 'retell_create_phone_call' for voice calls or 'retell_create_chat' for non-SMS chats. It also lacks information on prerequisites, like whether the agent must be configured for SMS, leaving the agent to infer usage from context alone.

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