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
| Name | Required | Description | Default |
|---|---|---|---|
| to | Yes | ||
| from | Yes | ||
| body | Yes |
Implementation Reference
- src/apis/twilio/twilio.ts:76-83 (handler)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); },
- src/apis/twilio/twilio.ts:51-55 (schema)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"], },
- src/apis/twilio/twilio.ts:48-56 (registration)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"], }, },
- src/apis/twilio/twilio.ts:16-23 (helper)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, }); }