Skip to main content
Glama

get_call_analytics

Retrieve call analytics and statistics from the MCP JSON Database Server using JWT authentication. Specify date and period for detailed analysis.

Instructions

Çağrı analitikleri ve istatistikleri getirir

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tokenYesJWT token
dateNoAnaliz tarihi (YYYY-MM-DD)
periodNoAnaliz periyodu (daily, weekly, monthly)

Implementation Reference

  • The handler for the 'get_call_analytics' tool. It checks user permissions, filters the call analytics data from the database by optional date parameter, logs the access, and returns the analytics in JSON format.
    case 'get_call_analytics': { const { token, date, period = 'daily' } = args; try { const user = checkPermissionWithToken(token, PERMISSIONS.TRANSCRIPT_ANALYTICS); let analytics = db.call_analytics; if (date) { analytics = analytics.filter(a => a.date === date); } await auditLogger.dataAccessed(user.userId, user.role, 'call_analytics', { date, period }); return { content: [{ type: 'text', text: JSON.stringify({ success: true, data: analytics, period, requestedBy: { id: user.userId, role: user.role } }, null, 2) }] }; } catch (error) { return { content: [{ type: 'text', text: JSON.stringify({ success: false, message: error.message, requiredPermission: PERMISSIONS.TRANSCRIPT_ANALYTICS }) }] }; } }
  • src/index.js:206-218 (registration)
    Registration of the 'get_call_analytics' tool in the ListToolsRequestSchema handler, defining its name, description, and input schema.
    { name: 'get_call_analytics', description: 'Çağrı analitikleri ve istatistikleri getirir', inputSchema: { type: 'object', properties: { token: { type: 'string', description: 'JWT token' }, date: { type: 'string', description: 'Analiz tarihi (YYYY-MM-DD)' }, period: { type: 'string', description: 'Analiz periyodu (daily, weekly, monthly)', enum: ['daily', 'weekly', 'monthly'] } }, required: ['token'] } },
  • Input schema for the 'get_call_analytics' tool, specifying required JWT token and optional date/period parameters.
    inputSchema: { type: 'object', properties: { token: { type: 'string', description: 'JWT token' }, date: { type: 'string', description: 'Analiz tarihi (YYYY-MM-DD)' }, period: { type: 'string', description: 'Analiz periyodu (daily, weekly, monthly)', enum: ['daily', 'weekly', 'monthly'] } }, required: ['token'] }

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/yusuferenkt/mcp-database'

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