Skip to main content
Glama

send_sms

Send SMS messages through Twilio using Multi-MCPs. Input recipient number, sender ID, and message body to deliver texts directly via the MCP server’s unified API integration.

Instructions

Send an SMS via Twilio

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
bodyYes
fromYes
toYes

Implementation Reference

  • The primary MCP tool handler for 'send_sms'. Validates input parameters and invokes the TwilioClient.sendSms method to execute the SMS sending.
    async send_sms(args: Record<string, unknown>) { if (!cfg.twilioAccountSid || !cfg.twilioAuthToken) throw new Error("TWILIO_ACCOUNT_SID/TWILIO_AUTH_TOKEN are not configured"); const to = String(args.to || ""); const from = String(args.from || ""); const body = String(args.body || ""); if (!to || !from || !body) throw new Error("to, from, body are required"); return client.sendSms(to, from, body); },
  • Input schema defining the required parameters (to, from, body as strings) for the send_sms tool.
    inputSchema: { type: "object", properties: { to: { type: "string" }, from: { type: "string" }, body: { type: "string" } }, required: ["to", "from", "body"], },
  • Local registration of the 'send_sms' tool within the Twilio module's tool list, including name, description, and schema.
    { name: "send_sms", description: "Send an SMS via Twilio", inputSchema: { type: "object", properties: { to: { type: "string" }, from: { type: "string" }, body: { type: "string" } }, required: ["to", "from", "body"], }, },
  • Global registration: Invocation of registerTwilio() in the central tools registry, which includes the send_sms tool.
    registerTwilio(),
  • TwilioClient helper method implementing the core HTTP request to Twilio's Messages endpoint for sending SMS.
    sendSms(to: string, from: string, body: string) { const form = new URLSearchParams({ To: to, From: from, Body: body }); return this.request(`/Accounts/${this.accountSid}/Messages.json`, { method: "POST", headers: { Authorization: `Basic ${this.authHeader}`, "content-type": "application/x-www-form-urlencoded" }, body: form as any, }); }

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/TaylorChen/muti-mcps'

If you have feedback or need assistance with the MCP directory API, please join our Discord server