Skip to main content
Glama

add_call_transcript

Adds new phone call transcripts to a JSON database, including caller details, conversation content, duration, category, and priority for tracking and analysis.

Instructions

Yeni telefon görüşmesi transkripti ekler

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tokenYesJWT token
callerPhoneYesArayan telefon numarası
callerNameYesArayan kişi adı
callerCompanyNoArayan şirket
transcriptYesKonuşma transkripti
durationYesGörüşme süresi (saniye)
categoryYesKategori (destek, satış, şikayet)
priorityNoÖncelik (low, normal, high, urgent)
keywordsNoAnahtar kelimeler

Implementation Reference

  • Handler for add_call_transcript tool: checks user permissions, creates a new call transcript entry with comprehensive details including auto-generated ID and timestamps, adds it to the database, logs the action, and returns the new transcript.
    case 'add_call_transcript': { const { token, callerPhone, callerName, callerCompany = "Bilinmiyor", transcript, duration, category, priority = "normal", keywords = [] } = args; try { const user = checkPermissionWithToken(token, PERMISSIONS.TRANSCRIPT_CREATE); const newTranscript = { id: generateId(db.call_transcripts), callId: `CALL_${new Date().toISOString().slice(0, 10).replace(/-/g, '')}_${String(db.call_transcripts.length + 1).padStart(3, '0')}`, callerPhone, callerName, callerCompany, receiverPhone: "+90 555 123 4567", // Sabit receiver phone receiverName: user.role === ROLES.EMPLOYEE ? db.users.find(u => u.id === user.userId)?.name : "Müşteri Hizmetleri", receiverDepartment: "Müşteri Hizmetleri", callDate: new Date().toISOString().slice(0, 10), callTime: new Date().toTimeString().slice(0, 8), duration, callType: "incoming", status: "completed", category, priority, transcript, keywords, sentiment: "neutral", // Default sentiment resolution: "pending", followUpRequired: false, assignedTo: user.userId, createdAt: new Date().toISOString(), updatedAt: new Date().toISOString() }; db.call_transcripts.push(newTranscript); await writeDatabase(db); await auditLogger.dataAccessed(user.userId, user.role, 'call_transcript_created', { transcriptId: newTranscript.id, category }); return { content: [{ type: 'text', text: JSON.stringify({ success: true, data: newTranscript, message: 'Transkript başarıyla eklendi', 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_CREATE }) }] }; } }
  • Input schema definition for the add_call_transcript tool, specifying parameters like token, caller details, transcript, duration, category, with required fields.
    inputSchema: { type: 'object', properties: { token: { type: 'string', description: 'JWT token' }, callerPhone: { type: 'string', description: 'Arayan telefon numarası' }, callerName: { type: 'string', description: 'Arayan kişi adı' }, callerCompany: { type: 'string', description: 'Arayan şirket' }, transcript: { type: 'string', description: 'Konuşma transkripti' }, duration: { type: 'number', description: 'Görüşme süresi (saniye)' }, category: { type: 'string', description: 'Kategori (destek, satış, şikayet)' }, priority: { type: 'string', description: 'Öncelik (low, normal, high, urgent)' }, keywords: { type: 'array', items: { type: 'string' }, description: 'Anahtar kelimeler' } }, required: ['token', 'callerPhone', 'callerName', 'transcript', 'duration', 'category']
  • src/index.js:172-190 (registration)
    Registration of the add_call_transcript tool in the ListToolsRequestSchema handler, including name, description, and input schema.
    { name: 'add_call_transcript', description: 'Yeni telefon görüşmesi transkripti ekler', inputSchema: { type: 'object', properties: { token: { type: 'string', description: 'JWT token' }, callerPhone: { type: 'string', description: 'Arayan telefon numarası' }, callerName: { type: 'string', description: 'Arayan kişi adı' }, callerCompany: { type: 'string', description: 'Arayan şirket' }, transcript: { type: 'string', description: 'Konuşma transkripti' }, duration: { type: 'number', description: 'Görüşme süresi (saniye)' }, category: { type: 'string', description: 'Kategori (destek, satış, şikayet)' }, priority: { type: 'string', description: 'Öncelik (low, normal, high, urgent)' }, keywords: { type: 'array', items: { type: 'string' }, description: 'Anahtar kelimeler' } }, required: ['token', 'callerPhone', 'callerName', 'transcript', 'duration', 'category'] } },

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