Skip to main content
Glama

start_call

Initiate phone calls through Voyp API to handle tasks like appointment scheduling or order processing, with real-time progress tracking available via returned URL.

Instructions

Start a new phone call via Voyp API. The API returns the call id and a URL where users can track the progress of the call

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
numberYesPhone number to call in E.164 format
languageNoLanguage of the call. Ex: en-US, pt-PT, fr-FR
contextYesContext of the call. Ex: Order a pizza

Implementation Reference

  • Handler for the 'start_call' tool within the CallToolRequestSchema. Extracts number, context, and optional language from arguments, makes a POST request to the Voyp API /call/start endpoint, and returns the response data as JSON text content.
    } else if (request.params.name === "start_call") {
    
        // if (!isValidForecastArgs(request.params.arguments)) {
        //     throw new McpError(
        //         ErrorCode.InvalidParams,
        //         "Invalid forecast arguments"
        //     );
        // }
    
        const number = request.params.arguments?.number;
        const context = request.params.arguments?.context;
        const language = request.params.arguments?.language;
    
        try {
            const response = await this.axiosInstance.post<StartCallResponse>(API_CONFIG.ENDPOINTS.START, {
                number,
                context,
                language
            });
    
            return {
                content: [{
                    type: "text",
                    text: JSON.stringify(response.data)
                }]
            };
        } catch (error) {
            if (axios.isAxiosError(error)) {
                return {
                    content: [{
                        type: "text",
                        text: `Voyp API error: ${error.response?.data.message ?? error.message}`
                    }],
                    isError: true,
                }
            }
            throw error;
        }
  • src/index.ts:208-228 (registration)
    Registration of the 'start_call' tool in the ListToolsRequestSchema handler, including name, description, and input schema definition.
        name: "start_call",
        description: "Start a new phone call via Voyp API. The API returns the call id and a URL where users can track the progress of the call",
        inputSchema: {
            type: "object",
            properties: {
                number: {
                    type: "string",
                    description: "Phone number to call in E.164 format"
                },
                language: {
                    type: "string",
                    description: "Language of the call. Ex: en-US, pt-PT, fr-FR"
                },
                context: {
                    type: "string",
                    description: "Context of the call. Ex: Order a pizza"
                }
            },
            required: ["number", "context"]
        }
    },
  • TypeScript interface for the StartCallResponse returned by the Voyp API, used in the handler's axios POST call.
    export interface StartCallResponse {
      id?: string;
      url?: string;
      error?: string
    }
  • TypeScript interface matching the request body structure for starting a call, aligning with the tool's input schema.
    export interface StartCallRequest {
      number: string;
      context: string;
    }

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/paulotaylor/voyp-mcp'

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