Skip to content

McpServer

Tore Nestenius edited this page Jul 5, 2025 · 1 revision

CloudDebugger MCP Tools Reference

This page documents the Model Context Protocol (MCP) tools, prompts, and resources available in the CloudDebugger tool. These tools demonstrate the integration of MCP capabilities into this application.

Note: The MCP support in CloudDebugger is experimental. We welcome your feedback as we evaluate and improve this integration.

The MCP server endpoint is available at: /mcp/sse

--

Table of Contents


Prompts

The following MCP prompts have been added to CloudDebugger. These prompts enable analysis, health checks, and correlation of logs and traces using the Model Context Protocol.

Trace Analysis

  • Prompt: analyze-trace <trace_id>
  • Description: Analyze an OpenTelemetry trace for performance issues, bottlenecks, and failures.
  • Input:
    • trace_id (string): The ID of the trace to analyze.
  • Output:
    • Report covering:
      • Trace overview and metrics
      • Performance hotspots
      • Error and failure analysis
      • Bottleneck detection
      • Optimization recommendations

Log Analysis

  • Prompt: analyze-logs <minutes>
  • Description: Analyze recent logs for errors, warnings, and performance patterns.
  • Input:
    • minutes (int, default: 5): Number of minutes of logs to analyze.
  • Output:
    • Log summary by level and category
    • Error and warning pattern grouping
    • Root cause analysis
    • Remediation steps and prioritized action plan

Trace/Log Correlation

  • Prompt: correlate-trace-logs <trace_id>
  • Description: Correlate a specific trace with related log entries for debugging.
  • Input:
    • trace_id (string): The trace ID to correlate.
  • Output:
    • Unified timeline of spans and log entries
    • Error and performance correlation
    • Debugging insights and recommendations

Quick Health Check

  • Prompt: quick-health-check
  • Description: Perform a quick health check of the CloudDebugger service based on recent telemetry.
  • Output:
    • Current status (Healthy/Warning/Critical)
    • Error rate (last 5 minutes)
    • Average response time
    • Top 3 active issues
    • Immediate recommended actions

Resources

Configuration Resource

  • URI: config://service/CloudDebugger
  • Description: Returns the current configuration settings and parameters as seen by the application, excluding sensitive keys.
  • Output:
    • All non-sensitive configuration key/values
    • Provider information (source, type, values)
    • Total settings and providers

Environment Variables

  • URI: env://service/CloudDebugger
  • Description: Returns the current environment variables and system settings, filtering out sensitive data.
  • Output:
    • All non-sensitive environment variables
    • Total count

Application Logs

  • Latest Logs:

    • URI: logs://service/CloudDebugger/app.log
      Returns the latest 50 application log entries.
  • Logs by Trace ID:

    • URI: logs://service/CloudDebugger/app.log/{traceId}
      Returns all log entries associated with a specific trace ID.
  • Output:

    • Timestamped log entries with level, category, message, exception info, trace/span IDs, and attributes

Traces

  • All Traces:

    • URI: traces://service/CloudDebugger
      Returns all available trace entries.
  • Trace by ID:

    • URI: traces://service/CloudDebugger/{traceId}
      Returns all trace entries for a specific trace ID.
  • Output:

    • Trace metadata (IDs, operation, timing, status, tags)

File Tools

The following tools allow secure file operations on the server:

Tool Name Description Parameters
list_files List all files and directories in a path path (string)
read_file Read the contents of a text file path (string)
write_file Create/overwrite a file with specified content path (string), content (string)
delete_file Delete a file path (string)
get_file_info Get info about a file or directory path (string)
  • All file tools return structured JSON with success/error, metadata, and details. Sensitive errors (e.g., access denied) are clearly indicated.

HTTP Tools

Tool Name Description Parameters
http_get Makes an HTTP GET request and returns the response url (string)
  • Output:
    • HTTP status, headers, content, response time, and error details if applicable.

Usage Notes

  • Security: Sensitive configuration and environment variables are automatically filtered.
  • Error Handling: All tools return structured errors with type and message.
  • Extensibility: Prompts and tools are designed for easy extension; see source code for annotation usage.

See Also

For further details, consult the source code or open an issue on the repository.

Clone this wiki locally