Skip to main content
Glama
yusuferenkt

MCP JSON Database Server

by yusuferenkt

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

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

With no annotations provided, the description carries full burden but only states the basic action without disclosing behavioral traits. It doesn't mention authentication needs (though 'token' parameter hints at it), potential side effects, error conditions, rate limits, or what happens on success. The description is minimal and lacks critical operational 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 purpose with zero wasted words. It's appropriately sized and front-loaded, making it easy to parse quickly.

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 creation tool with 9 parameters, no annotations, and no output schema, the description is insufficiently complete. It doesn't explain what the tool returns, error handling, or important behavioral aspects like whether duplicates are allowed. The high parameter count and mutation nature require more context than provided.

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%, so parameters are well-documented in the schema itself. The description adds no additional parameter semantics beyond what's in the schema. Baseline 3 is appropriate when the schema does the heavy lifting, though the description doesn't compensate or enhance parameter understanding.

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 'Yeni telefon görüşmesi transkripti ekler' clearly states the action (adds/ekler) and resource (new phone call transcript/yeni telefon görüşmesi transkripti). It distinguishes from siblings like 'update_call_transcript' by specifying 'new' but doesn't fully differentiate from all other tools beyond the obvious transcript-related ones.

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 'update_call_transcript' or 'search_call_transcripts'. It doesn't mention prerequisites, context for creation, or any exclusions. Usage is implied by the action but not explicitly stated.

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