Skip to main content
Glama

clear_debug_logs

Remove all collected debug logs to free up memory and prepare for new debugging sessions in the agentic-debugger MCP server.

Instructions

Clear all collected debug logs.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler for the 'clear_debug_logs' tool within the CallToolRequestSchema switch statement. It verifies an active debug session exists and invokes sessionManager.clearLogs() to clear the logs, returning a success message.
    case 'clear_debug_logs': {
      if (!sessionManager.isActive()) {
        return {
          content: [{ type: 'text', text: 'No active debug session.' }],
          isError: true,
        };
      }
    
      sessionManager.clearLogs();
      return {
        content: [{ type: 'text', text: 'Debug logs cleared.' }],
      };
    }
  • The tool schema definition returned by the ListToolsRequestSchema handler, specifying the name, description, and empty input schema for 'clear_debug_logs'.
    {
      name: 'clear_debug_logs',
      description: 'Clear all collected debug logs.',
      inputSchema: {
        type: 'object',
        properties: {},
      },
    },
  • The SessionManager.clearLogs() method, which clears the debug log file by overwriting it with an empty string.
    clearLogs(): void {
      if (!this.session) {
        throw new Error('No active debug session');
      }
    
      writeFileSync(this.session.logFile, '');
    }

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/iarmankhan/agentic-debugger'

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