Skip to main content
Glama
yusuferenkt

MCP JSON Database Server

by yusuferenkt

search_call_transcripts

Search call transcripts by keyword, caller name, or metadata to quickly locate specific conversations within the MCP JSON Database Server.

Instructions

Transkriptlerde anahtar kelime arama yapar

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tokenYesJWT token
queryYesAranacak kelime veya cümle
searchInNoArama alanı (transcript, callerName, keywords)

Implementation Reference

  • The handler for 'search_call_transcripts' tool. It checks user permissions via token, filters transcripts (employee sees only assigned), searches in specified field (transcript, callerName, keywords, or all) using case-insensitive matching, logs the search, and returns matching transcripts.
    case 'search_call_transcripts': {
      const { token, query, searchIn = 'all' } = args;
      
      try {
        const user = checkPermissionWithToken(token, PERMISSIONS.TRANSCRIPT_SEARCH);
        let transcripts = db.call_transcripts;
        
        // Employee sadece kendi atandığı çağrıları arayabilir
        if (user.role === ROLES.EMPLOYEE) {
          transcripts = transcripts.filter(t => t.assignedTo === user.userId);
        }
        
        const searchQuery = query.toLowerCase();
        const results = transcripts.filter(transcript => {
          switch (searchIn) {
            case 'transcript':
              return transcript.transcript.toLowerCase().includes(searchQuery);
            case 'callerName':
              return transcript.callerName.toLowerCase().includes(searchQuery);
            case 'keywords':
              return transcript.keywords.some(keyword => keyword.toLowerCase().includes(searchQuery));
            case 'all':
            default:
              return transcript.transcript.toLowerCase().includes(searchQuery) ||
                     transcript.callerName.toLowerCase().includes(searchQuery) ||
                     transcript.keywords.some(keyword => keyword.toLowerCase().includes(searchQuery)) ||
                     transcript.callerCompany.toLowerCase().includes(searchQuery);
          }
        });
        
        await auditLogger.dataAccessed(user.userId, user.role, 'call_transcript_search', { query, searchIn, resultCount: results.length });
        
        return {
          content: [{
            type: 'text',
            text: JSON.stringify({
              success: true,
              data: results,
              searchQuery: query,
              searchIn,
              total: results.length,
              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_SEARCH
            })
          }]
        };
      }
    }
  • The input schema and registration details for the 'search_call_transcripts' tool, defining required token and query parameters, optional searchIn field, and tool description.
    {
      name: 'search_call_transcripts',
      description: 'Transkriptlerde anahtar kelime arama yapar',
      inputSchema: {
        type: 'object',
        properties: {
          token: { type: 'string', description: 'JWT token' },
          query: { type: 'string', description: 'Aranacak kelime veya cümle' },
          searchIn: { type: 'string', description: 'Arama alanı (transcript, callerName, keywords)', enum: ['transcript', 'callerName', 'keywords', 'all'] }
        },
        required: ['token', 'query']
      }
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. It states the tool searches for keywords in transcripts, implying a read-only operation, but doesn't disclose behavioral traits like authentication needs (implied by the 'token' parameter), rate limits, or what the search returns (e.g., results format, pagination). This is a significant gap for a tool with no annotation coverage.

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 is appropriately sized and front-loaded, with every word earning its place.

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, no output schema, and 3 parameters, the description is incomplete. It doesn't explain the return values, authentication requirements (beyond the token parameter), or how results are structured, leaving gaps for a search tool that likely returns complex data.

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 schema description coverage is 100%, so the schema already documents all parameters (token, query, searchIn) with descriptions and an enum. The description adds no additional meaning beyond what the schema provides, such as examples or usage notes, but the baseline is 3 when schema coverage is high.

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 'Transkriptlerde anahtar kelime arama yapar' clearly states the tool's purpose: searching for keywords in transcripts. It specifies the verb (search) and resource (transcripts), though it doesn't explicitly differentiate from sibling tools like 'list_call_transcripts' or 'search_users', which would require a 5.

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. It doesn't mention sibling tools like 'list_call_transcripts' for unfiltered listing or 'search_users' for different resources, nor does it specify prerequisites or contexts for usage.

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