Skip to main content
Glama

rapid_debug

Analyze server logs to identify issues and receive actionable fixes with debug commands in under 30 seconds.

Instructions

🚀 DEBUG SERVER LOGS IN UNDER 30 SECONDS - Instant analysis with actionable fixes and debug commands

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
logTextYesLog content to rapidly analyze and debug

Implementation Reference

  • Core handler function that executes the rapid_debug tool logic: performs instant pattern analysis, AI-powered log analysis, generates quick fixes and debug commands, all optimized to complete in under 30 seconds.
    async debugInUnder30Seconds(logContent: string): Promise<RapidDebugResult> {
      const startTime = Date.now();
      
      // Phase 1: Instant Pattern Analysis (< 1 second)
      const patterns = this.instantPatternAnalysis(logContent);
      
      // Phase 2: AI Analysis (< 5 seconds)
      const aiAnalysis = await this.logAnalyzer.analyzeLogs(logContent, {
        logFormat: 'auto',
        contextLines: 20 // Reduced for speed
      });
      
      // Phase 3: Generate Quick Fixes (< 2 seconds)
      const quickFixes = this.generateQuickFixes(patterns, aiAnalysis);
      
      // Phase 4: Debug Commands (< 1 second)
      const debugCommands = this.generateDebugCommands(patterns);
      
      const totalTime = Date.now() - startTime;
      
      return {
        timeToAnalysis: totalTime,
        criticalErrors: patterns.criticalErrors,
        quickFixes,
        debugCommands,
        rootCause: aiAnalysis.rootCause,
        confidence: aiAnalysis.confidence,
        nextSteps: this.generateNextSteps(patterns, aiAnalysis)
      };
    }
  • src/server.ts:50-63 (registration)
    Registration of the 'rapid_debug' tool in the ListToolsRequestSchema handler, including name, description, and input schema.
    {
      name: 'rapid_debug',
      description: '🚀 DEBUG SERVER LOGS IN UNDER 30 SECONDS - Instant analysis with actionable fixes and debug commands',
      inputSchema: {
        type: 'object',
        properties: {
          logText: {
            type: 'string',
            description: 'Log content to rapidly analyze and debug'
          }
        },
        required: ['logText']
      }
    },
  • MCP server-side handler for the 'rapid_debug' tool call, validates input, invokes core debugger, and formats the MCPToolResult response.
    private async handleRapidDebug(args: any): Promise<MCPToolResult> {
      const { logText } = args;
    
      if (!logText || typeof logText !== 'string') {
        throw new Error('logText is required and must be a string');
      }
    
      const startTime = Date.now();
      const debugResult = await this.rapidDebugger.debugInUnder30Seconds(logText);
      const totalTime = Date.now() - startTime;
    
      return {
        success: true,
        data: {
          ...debugResult,
          totalProcessingTime: totalTime,
          message: `🚀 Server debugging completed in ${debugResult.timeToAnalysis}ms`,
          under30Seconds: debugResult.timeToAnalysis < 30000
        },
        metadata: {
          processedAt: new Date(),
          logLength: logText.length,
          debugMode: 'rapid'
        }
      };
    }
  • Output schema defining the structure of the RapidDebugResult returned by the tool.
    export interface RapidDebugResult {
      timeToAnalysis: number;
      criticalErrors: string[];
      quickFixes: QuickFix[];
      debugCommands: string[];
      rootCause: string;
      confidence: number;
      nextSteps: string[];
    }
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 claims 'Instant analysis with actionable fixes and debug commands' and 'under 30 seconds,' which hints at performance and output type, but doesn't detail what 'actionable fixes' entail, whether it modifies logs, requires specific permissions, or handles errors. For a tool with no annotations, this leaves significant behavioral gaps.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is concise and front-loaded with key information ('DEBUG SERVER LOGS IN UNDER 30 SECONDS'), using an emoji and bold claims efficiently. It consists of a single sentence that communicates the core purpose and speed, though it could be slightly more structured by separating features from promises.

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 the tool's complexity (debugging logs with potential fixes), lack of annotations, and no output schema, the description is incomplete. It doesn't explain what 'actionable fixes' or 'debug commands' mean in practice, the return format, or error handling. For a tool that implies analysis and possible actions, more context is needed to guide effective use.

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 'logText' documented as 'Log content to rapidly analyze and debug.' The description adds no additional parameter semantics beyond this, such as format constraints or examples. With high schema coverage, the baseline score of 3 is appropriate, as the description doesn't compensate but doesn't detract either.

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 tool's purpose: 'DEBUG SERVER LOGS' with 'Instant analysis with actionable fixes and debug commands.' It specifies the verb (debug/analyze) and resource (server logs), though it doesn't explicitly differentiate from sibling tools like 'analyze_log' or 'get_recent_errors.' The description is specific but lacks sibling distinction.

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 'analyze_log' or 'get_recent_errors.' It mentions 'rapidly analyze and debug' but doesn't specify contexts, exclusions, or prerequisites. Without explicit when/when-not instructions, it offers minimal usage guidance.

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/ChiragPatankar/loganalyzer-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server