Skip to main content
Glama

list_call_transcripts

Retrieve and filter call transcripts by category or sentiment using JWT authentication, with customizable limit options for efficient data access.

Instructions

Telefon görüşmeleri transkriptlerini listeler

Input Schema

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

Implementation Reference

  • The handler function for the list_call_transcripts tool. It checks user permissions via token, filters call transcripts based on user role (employees see only their assigned transcripts), applies optional category and sentiment filters, limits the results, logs the access, and returns the filtered list of transcripts.
    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:133-146 (registration)
    Tool registration in the ListTools response, including name, description, and input schema definition for list_call_transcripts.
    { 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 required token and optional filters.
    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']

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