Skip to main content
Glama

read_debug_logs

Retrieve and analyze debug logs from project runtime to identify issues and understand execution flow for troubleshooting.

Instructions

Read debug logs from the project. Logs are stored in {projectPath}/.debug/debug.log. Use this to analyze what happened during runtime execution after the user has tested the code with injected debug logs. ⚠️ IMPORTANT: If the user confirms the bug is FIXED (e.g., says "It works!", "Fixed!", "Success!", "Thanks!"), you should immediately: 1) Use clear_debug_logs to clear the log file, 2) Remove ALL debug code blocks (search for DEBUG CODE START/END markers), 3) Revert ALL temporary visual/test markers (search for "TEMPORARY DEBUG MARKER" comments), 4) Restore original code (button labels, images, styles, colors, etc.), 5) Confirm cleanup is complete. Do NOT ask for confirmation - just clean up directly when user confirms success.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
projectPathYesThe absolute path to the project directory where logs are stored
lastLinesNoNumber of most recent log lines to retrieve (default: 100)
Behavior4/5

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

With no annotations provided, the description carries full burden for behavioral disclosure. It effectively describes the tool's behavior: reading from a specific file path, being used for post-test analysis, and triggering cleanup workflows. It mentions important constraints (user confirmation triggers cleanup) and integration with other tools. However, it doesn't address potential error conditions or rate limits.

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

Conciseness2/5

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

The description is poorly structured and overly verbose. The first two sentences describe the tool's purpose appropriately, but the remaining 80% consists of cleanup instructions that belong in usage guidelines rather than tool description. This creates information overload and buries the core purpose. The cleanup section should be more concise or separated.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a read operation with 2 parameters and 100% schema coverage but no output schema, the description is moderately complete. It explains the tool's purpose and usage context well, but lacks information about return format (log structure, error responses). The extensive cleanup instructions somewhat compensate for missing output schema, but create focus issues.

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?

Schema description coverage is 100%, so the schema already documents both parameters completely. The description mentions the projectPath parameter in context ('Logs are stored in {projectPath}/.debug/debug.log') but adds no additional semantic meaning beyond what the schema provides. The baseline of 3 is appropriate when the schema does the heavy lifting.

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: 'Read debug logs from the project' with specific resource location '{projectPath}/.debug/debug.log'. It distinguishes from siblings like 'clear_debug_logs' by focusing on reading rather than clearing. However, it doesn't explicitly differentiate from 'list_debug_blocks' or 'analyze_bug' which might also involve log analysis.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides explicit usage guidelines: 'Use this to analyze what happened during runtime execution after the user has tested the code with injected debug logs.' It also specifies when NOT to use it (when bugs are fixed) and names an alternative tool ('clear_debug_logs') for cleanup operations. The detailed cleanup instructions create clear boundaries for when this tool's purpose ends.

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/ahao0150/debug-mcp'

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