Skip to main content
Glama

make_call

Make a phone call using Twilio by specifying the recipient, sender, and TwiML URL. Integrate voice communication functionality into applications via the Multi-MCPs server.

Instructions

Make a phone call via Twilio with a TwiML URL

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
fromYes
toYes
twiml_urlYes

Implementation Reference

  • The main handler function for the 'make_call' tool. It validates the input arguments (to, from, twiml_url) and calls the Twilio client's makeCall method to initiate the phone call.
    async make_call(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 twimlUrl = String(args.twiml_url || ""); if (!to || !from || !twimlUrl) throw new Error("to, from, twiml_url are required"); return client.makeCall(to, from, twimlUrl); },
  • Tool registration entry for 'make_call', including name, description, and input schema.
    name: "make_call", description: "Make a phone call via Twilio with a TwiML URL", inputSchema: { type: "object", properties: { to: { type: "string" }, from: { type: "string" }, twiml_url: { type: "string" } }, required: ["to", "from", "twiml_url"], }, },
  • Input schema defining the required parameters for the make_call tool: to, from, twiml_url as strings.
    inputSchema: { type: "object", properties: { to: { type: "string" }, from: { type: "string" }, twiml_url: { type: "string" } }, required: ["to", "from", "twiml_url"], },
  • TwilioClient.makeCall helper method that performs the HTTP POST request to Twilio's Calls endpoint to create a phone call.
    makeCall(to: string, from: string, twimlUrl: string) { const form = new URLSearchParams({ To: to, From: from, Url: twimlUrl }); return this.request(`/Accounts/${this.accountSid}/Calls.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