Skip to main content
Glama

hangup_call

Terminate an ongoing call by providing its unique ID to end telephony sessions through the Voyp MCP Server's integration capabilities.

Instructions

Hangup an existing call

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesID of the call

Implementation Reference

  • Handler for the 'hangup_call' tool within the CallToolRequestSchema request handler. Validates the 'id' parameter, performs a POST request to the Voyp API hangup endpoint, and returns the response or handles errors.
    if (request.params.name === "hangup_call") { if (typeof (request.params.arguments?.id) !== 'string') { throw new McpError( ErrorCode.InvalidParams, "Invalid hangup arguments" ); } const id : string = request.params.arguments?.id as string; try { const response = await this.axiosInstance.post<HangupCallResponse>(API_CONFIG.ENDPOINTS.HANGUP, { id: id}); 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:229-242 (registration)
    Registration of the 'hangup_call' tool in the ListToolsRequestSchema handler, defining its name, description, and input schema.
    { name: "hangup_call", description: "Hangup an existing call", inputSchema: { type: "object", properties: { id: { type: "string", description: "ID of the call" } }, required: ["id"] } },
  • TypeScript interface defining the response structure for the 'hangup_call' tool API call.
    export interface HangupCallResponse { success?: boolean; error?: 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