Skip to main content
Glama
yusuferenkt

MCP JSON Database Server

by yusuferenkt

list_call_transcripts

Retrieve call transcripts from the MCP JSON Database Server using filters for category, sentiment, and result limits to analyze customer interactions.

Instructions

Telefon görüşmeleri transkriptlerini listeler

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tokenYesJWT token
limitNoGösterilecek kayıt sayısı (varsayılan: 50)
categoryNoKategori filtresi (destek, satış, şikayet)
sentimentNoDuygu durumu filtresi (positive, negative, neutral)

Implementation Reference

  • Handler function for the 'list_call_transcripts' tool. Validates token and permissions, filters transcripts by role (employees see only assigned), applies category/sentiment filters, limits results, logs access, and returns JSON response.
    case 'list_call_transcripts': {
      const { token, limit = 50, category, sentiment } = args;
      
      try {
        console.error('DEBUG: list_call_transcripts called with token:', token ? 'PROVIDED' : 'MISSING');
        console.error('DEBUG: PERMISSIONS.TRANSCRIPT_LIST:', PERMISSIONS.TRANSCRIPT_LIST);
        
        const user = checkPermissionWithToken(token, PERMISSIONS.TRANSCRIPT_LIST);
        console.error('DEBUG: User permission check passed:', user);
        
        let transcripts = db.call_transcripts;
        console.error('DEBUG: Total transcripts in DB:', transcripts.length);
        
        // Employee sadece kendi atandığı çağrıları görebilir
        if (user.role === ROLES.EMPLOYEE) {
          transcripts = transcripts.filter(t => t.assignedTo === user.userId);
          console.error('DEBUG: Filtered for employee, remaining:', transcripts.length);
        }
        
        // Filtreler
        if (category) {
          transcripts = transcripts.filter(t => t.category === category);
        }
        if (sentiment) {
          transcripts = transcripts.filter(t => t.sentiment === sentiment);
        }
        
        // Limit uygula
        transcripts = transcripts.slice(0, limit);
        
        await auditLogger.dataAccessed(user.userId, user.role, 'call_transcripts_list', { limit, category, sentiment });
        
        return {
          content: [{
            type: 'text',
            text: JSON.stringify({
              success: true,
              data: transcripts,
              total: transcripts.length,
              filters: { category, sentiment },
              requestedBy: { id: user.userId, role: user.role }
            }, null, 2)
          }]
        };
      } catch (error) {
        console.error('DEBUG: Error in list_call_transcripts:', error.message);
        return {
          content: [{
            type: 'text',
            text: JSON.stringify({ 
              success: false, 
              message: error.message,
              requiredPermission: PERMISSIONS.TRANSCRIPT_LIST,
              debug: {
                errorType: error.constructor.name,
                hasToken: !!token,
                permissionRequired: PERMISSIONS.TRANSCRIPT_LIST
              }
            })
          }]
        };
      }
    }
  • src/index.js:134-146 (registration)
    Registration of the 'list_call_transcripts' tool in the ListToolsRequestHandler, including name, description, and input schema definition.
      name: 'list_call_transcripts',
      description: 'Telefon görüşmeleri transkriptlerini listeler',
      inputSchema: {
        type: 'object',
        properties: {
          token: { type: 'string', description: 'JWT token' },
          limit: { type: 'number', description: 'Gösterilecek kayıt sayısı (varsayılan: 50)' },
          category: { type: 'string', description: 'Kategori filtresi (destek, satış, şikayet)' },
          sentiment: { type: 'string', description: 'Duygu durumu filtresi (positive, negative, neutral)' }
        },
        required: ['token']
      }
    },
  • Input schema definition for the 'list_call_transcripts' tool, specifying parameters like token (required), limit, category, and sentiment.
    type: 'object',
    properties: {
      token: { type: 'string', description: 'JWT token' },
      limit: { type: 'number', description: 'Gösterilecek kayıt sayısı (varsayılan: 50)' },
      category: { type: 'string', description: 'Kategori filtresi (destek, satış, şikayet)' },
      sentiment: { type: 'string', description: 'Duygu durumu filtresi (positive, negative, neutral)' }
    },
    required: ['token']
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure but offers minimal information. It doesn't mention whether this is a read-only operation, what permissions are required, how results are returned (pagination, format), or any rate limits. The description only states the basic action without behavioral context.

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, efficient sentence in Turkish that directly states the tool's function without unnecessary words. It's appropriately sized and front-loaded with the essential information, making it highly concise and well-structured.

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?

For a tool with 4 parameters, no annotations, and no output schema, the description is insufficiently complete. It doesn't explain what the tool returns, how results are structured, or provide behavioral context needed for proper usage. The agent would need to rely heavily on the schema alone, which is inadequate for comprehensive understanding.

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?

The input schema has 100% description coverage, providing clear documentation for all 4 parameters. The tool description adds no additional parameter information beyond what's already in the schema, so it meets the baseline expectation but doesn't enhance understanding of parameter usage or semantics.

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 verb ('listeler' - lists) and resource ('Telefon görüşmeleri transkriptlerini' - phone call transcripts), making the purpose immediately understandable. However, it doesn't distinguish this tool from its sibling 'search_call_transcripts', which appears to serve a similar function, preventing a perfect score.

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 like 'search_call_transcripts' or 'get_call_transcript_by_id'. There's no mention of prerequisites, context, or exclusions, leaving the agent with insufficient usage direction.

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