Skip to main content
Glama

retell_create_sms_chat

Initiate SMS conversations using AI agents by specifying sender, recipient, and agent ID. Enables automated outbound messaging through Retell AI's platform.

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

  • The handler logic for the retell_create_sms_chat tool, which makes a POST request to the Retell API's /create-sms-chat endpoint using the generic retellRequest helper.
    case "retell_create_sms_chat": return retellRequest("/create-sms-chat", "POST", args);
  • Input schema definition and description for the retell_create_sms_chat tool, defining required parameters like from_number, to_number, and 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)
    Registration of the tools list handler that exposes the retell_create_sms_chat tool (and others) via MCP's ListToolsRequestSchema.
    server.setRequestHandler(ListToolsRequestSchema, async () => { return { tools }; });
  • Generic helper function used by all Retell tools, including retell_create_sms_chat, 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(); }

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