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, '');
    }
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It implies a destructive action ('Clear') but doesn't specify if logs are permanently deleted, if this requires specific permissions, or what happens after clearing (e.g., confirmation, error handling). This leaves significant gaps for a mutation tool.

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 with no wasted words, front-loading the key action and resource. It's appropriately sized for a simple tool with no parameters.

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 destructive nature (implied by 'Clear'), lack of annotations, and no output schema, the description is incomplete. It doesn't cover behavioral aspects like safety, permissions, or what to expect after execution, which are crucial for a mutation tool in a debugging context.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The tool has zero parameters, and the schema description coverage is 100%, so there's no need for parameter details in the description. The baseline for zero parameters is 4, as the description appropriately doesn't waste space on non-existent parameters.

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 action ('Clear') and the resource ('all collected debug logs'), making the purpose immediately understandable. However, it doesn't differentiate from sibling tools like 'read_debug_logs' or 'stop_debug_session' in terms of scope or relationship, which prevents a perfect score.

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 'read_debug_logs' or 'stop_debug_session', nor does it mention prerequisites such as needing an active debug session. It only states what the tool does, not when it's appropriate.

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

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