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
| Name | Required | Description | Default |
|---|---|---|---|
| body | Yes | ||
| from | Yes | ||
| to | Yes |
Implementation Reference
- src/apis/twilio/twilio.ts:76-83 (handler)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); },
- src/apis/twilio/twilio.ts:51-55 (schema)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"], },
- src/apis/twilio/twilio.ts:48-56 (registration)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"], }, },
- src/tools/register.ts:30-30 (registration)Global registration: Invocation of registerTwilio() in the central tools registry, which includes the send_sms tool.registerTwilio(),
- src/apis/twilio/twilio.ts:16-23 (helper)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, }); }