Skip to main content
Glama
yusuferenkt

MCP JSON Database Server

by yusuferenkt

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']
    }
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden of behavioral disclosure. It only states what the tool does (retrieves analytics) without any details on permissions, rate limits, data format, or potential side effects. For a tool with no annotations, this is insufficient to inform the agent about behavioral traits.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, clear sentence in Turkish: 'Çağrı analitikleri ve istatistikleri getirir'. It is front-loaded with the core purpose, has no unnecessary words, and efficiently communicates the tool's function without waste.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the complexity of analytics retrieval, no annotations, and no output schema, the description is incomplete. It does not explain what analytics are returned, the format of the data, or any constraints (e.g., date ranges, aggregation methods). This leaves significant gaps for the agent to understand the tool's full context.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, meaning all parameters (token, date, period) are documented in the schema. The description does not add any additional meaning or context beyond what the schema provides, such as explaining how parameters interact or default behaviors. Baseline score of 3 is appropriate as the schema handles parameter documentation adequately.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: 'Çağrı analitikleri ve istatistikleri getirir' (retrieves call analytics and statistics). It specifies the verb 'getirir' (retrieves) and resource 'call analytics and statistics', making it understandable. However, it does not differentiate from siblings like 'get_call_transcript_by_id' or 'list_call_transcripts', which also retrieve call-related data, so it lacks sibling distinction.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It does not mention any context, prerequisites, or exclusions, such as how it differs from other analytics tools or when to prefer it over general call retrieval tools. This leaves the agent without clear usage instructions.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

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

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