Skip to main content
Glama

send_sms

Send SMS messages via Twilio integration within the Multi-MCPs server. Specify recipient, sender, and message content to deliver text notifications or alerts.

Instructions

Send an SMS via Twilio

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
toYes
fromYes
bodyYes

Implementation Reference

  • The asynchronous handler function for the 'send_sms' tool. It validates the input arguments, extracts 'to', 'from', and 'body', and delegates to the Twilio client's sendSms method.
    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); },
  • The input schema for the 'send_sms' tool, specifying an object with required string properties 'to', 'from', and 'body'.
    inputSchema: { type: "object", properties: { to: { type: "string" }, from: { type: "string" }, body: { type: "string" } }, required: ["to", "from", "body"], },
  • The tool registration object for 'send_sms', including name, description, and input schema, within the registerTwilio function's tools array.
    { 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"], }, },
  • The 'sendSms' helper method in the TwilioClient class that constructs and sends the POST request to Twilio's Messages endpoint.
    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