Skip to main content
Glama

phone_health_check

Assess and monitor the health status of your telephone system with this diagnostic tool, ensuring reliable performance for automated conversational phone calls using Asterisk and Speech-to-Speech capabilities.

Instructions

Verificar el estado de salud del sistema telefónico

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • index.ts:172-188 (registration)
    Registration of the MCP tool 'phone_health_check' with empty input schema and inline handler function that invokes phoneTools.healthCheck() and formats a status response with icons and details.
    "phone_health_check", "Verificar el estado de salud del sistema telefónico", {}, async () => { const result = await phoneTools.healthCheck(); const statusIcon = result.status === 'healthy' ? '✅' : '❌'; const phoneIcon = result.phoneAssistant ? '📞' : '📵'; return { content: [{ type: "text", text: `${statusIcon} **Estado del Sistema: ${result.status.toUpperCase()}**\n\n${phoneIcon} **Asistente telefónico:** ${result.phoneAssistant ? 'Conectado' : 'Desconectado'}\n📊 **Llamadas activas:** ${result.activeCalls}\n🕐 **Verificado:** ${result.timestamp}${result.lastError ? `\n❌ **Último error:** ${result.lastError}` : ''}` }], }; } );
  • Supporting healthCheck helper function in phoneTools that delegates to phoneOps.healthCheck() and adds a timestamp to the result.
    export async function healthCheck(): Promise<{ status: 'healthy' | 'unhealthy'; phoneAssistant: boolean; activeCalls: number; lastError?: string; timestamp: string; }> { const health = await phoneOps.healthCheck(); return { ...health, timestamp: new Date().toISOString() }; }
  • Core healthCheck implementation that uses the PhoneClient to check the phone assistant health, counts active calls, and handles errors.
    export async function healthCheck(): Promise<{ status: 'healthy' | 'unhealthy'; phoneAssistant: boolean; activeCalls: number; lastError?: string; }> { try { const client = getPhoneClient(); const isHealthy = await client.healthCheck(); return { status: isHealthy ? 'healthy' : 'unhealthy', phoneAssistant: isHealthy, activeCalls: activeCalls.size }; } catch (error) { return { status: 'unhealthy', phoneAssistant: false, activeCalls: activeCalls.size, lastError: error instanceof Error ? error.message : 'Unknown error' }; } }

Other Tools

Related Tools

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/gcorroto/mcp-s2s-asterisk'

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