Skip to main content
Glama
yusuferenkt

MCP JSON Database Server

by yusuferenkt

get_call_transcript_by_id

Retrieve phone call transcripts by ID using JWT authentication. Access specific conversation records from the database for review or analysis.

Instructions

ID'ye göre telefon transkripti getirir

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tokenYesJWT token
idYesTranskript ID'si

Implementation Reference

  • Main execution logic for the 'get_call_transcript_by_id' tool. Performs permission checks, retrieves the specific call transcript by ID from the database, enforces role-based access (employees see only assigned transcripts), audits access, and returns the transcript data as JSON.
    case 'get_call_transcript_by_id': {
      const { token, id } = args;
      
      try {
        const user = checkPermissionWithToken(token, PERMISSIONS.TRANSCRIPT_READ);
        const transcript = db.call_transcripts.find(t => t.id === id);
        
        if (!transcript) {
          return {
            content: [{
              type: 'text',
              text: JSON.stringify({ success: false, message: 'Transkript bulunamadı' })
            }]
          };
        }
        
        // Employee sadece kendi atandığı çağrıları görebilir
        if (user.role === ROLES.EMPLOYEE && transcript.assignedTo !== user.userId) {
          await auditLogger.permissionDenied(user.userId, user.role, 'get_call_transcript_by_id', PERMISSIONS.TRANSCRIPT_READ);
          return {
            content: [{
              type: 'text',
              text: JSON.stringify({ success: false, message: 'Bu transkripti görüntüleme yetkiniz yok' })
            }]
          };
        }
        
        await auditLogger.dataAccessed(user.userId, user.role, 'call_transcript_detail', { transcriptId: id });
        
        return {
          content: [{
            type: 'text',
            text: JSON.stringify({
              success: true,
              data: transcript,
              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_READ
            })
          }]
        };
      }
    }
  • Tool schema definition including name, description, and input schema specifying required 'token' (JWT) and 'id' (transcript ID) parameters.
    {
      name: 'get_call_transcript_by_id',
      description: 'ID\'ye göre telefon transkripti getirir',
      inputSchema: {
        type: 'object',
        properties: {
          token: { type: 'string', description: 'JWT token' },
          id: { type: 'number', description: 'Transkript ID\'si' }
        },
        required: ['token', 'id']
      }
  • src/index.js:147-158 (registration)
    Registration of the tool in the ListTools response array, making it discoverable by MCP clients.
    {
      name: 'get_call_transcript_by_id',
      description: 'ID\'ye göre telefon transkripti getirir',
      inputSchema: {
        type: 'object',
        properties: {
          token: { type: 'string', description: 'JWT token' },
          id: { type: 'number', description: 'Transkript ID\'si' }
        },
        required: ['token', 'id']
      }
    },
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 a transcript by ID) without mentioning whether it's a read-only operation, requires authentication (implied by token parameter but not described), has rate limits, or what happens on errors (e.g., invalid ID). For a tool with no annotations, this leaves significant gaps in understanding its behavior.

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 without unnecessary words. It's appropriately sized for a simple retrieval tool and front-loaded with the core action. Every part of the sentence earns its place by specifying the resource and identifier method.

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 no annotations and no output schema, the description is incomplete for a tool with authentication requirements and potential behavioral complexities. It doesn't explain what the tool returns (e.g., transcript content, error formats) or address authentication needs beyond the implied token parameter. For a tool with 2 required parameters and security implications, more context is needed.

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, with clear documentation for both parameters ('token' as JWT token, 'id' as transcript ID). The description adds no additional meaning beyond what the schema provides—it doesn't explain parameter interactions, format requirements (e.g., numeric ID constraints), or usage context. Baseline score of 3 is appropriate since the schema does the heavy lifting.

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 ('getirir' - gets/fetches) and resource ('telefon transkripti' - phone transcript) with a specific identifier constraint ('ID'ye göre' - by ID). It distinguishes from siblings like 'list_call_transcripts' and 'search_call_transcripts' by specifying retrieval of a single transcript by ID rather than listing or searching. However, it doesn't explicitly contrast with 'get_call_analytics' which might also involve transcripts.

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 'list_call_transcripts' or 'search_call_transcripts'. It doesn't mention prerequisites (e.g., authentication via token) or exclusions (e.g., not for bulk retrieval). The context is implied through the parameter 'id' but not explicitly stated in the description text.

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