Skip to main content
Glama

get_debug_template

Generate debug code templates for specific environments to log runtime data via HTTP POST, storing logs in the project directory for analysis.

Instructions

Get a debug code template for a specific environment. ⚠️ IMPORTANT INSTRUCTIONS FOR AI: 1) DO NOT use console.log() - the generated code uses HTTP POST to send logs to the debug server, 2) ALWAYS provide the projectPath parameter as the absolute path to the project directory (e.g., /path/to/project or process.cwd()), 3) The debug logs will be stored at {projectPath}/.debug/debug.log in the project directory, NOT in the user home directory. After getting the template, manually insert it into the appropriate location in the user's file. ⚠️ AFTER INSERTING DEBUG CODE: You MUST inform the user about: 1) What you suspect might be wrong, 2) What specific test steps they should take, 3) What results to expect, 4) How to report back the results. After user tests, use read_debug_logs to analyze the actual runtime data. ⚠️ MARKING TEMPORARY MODIFICATIONS: ANY temporary changes for debugging (including visual markers, test images, placeholder text, button label changes, color highlights, etc.) MUST be wrapped with clear comments: "// TEMPORARY DEBUG MARKER - WILL BE REVERTED" at the start and "// END TEMPORARY DEBUG MARKER" at the end. Keep a list of ALL temporary modifications (both debug code AND visual/test changes) and ensure ALL are reverted during cleanup.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
environmentYesRuntime environment: browser, node, python, php, react-native, wechat
logMessageYesThe log message to describe what is being logged
variablesNoVariable names to include in the log data
projectPathYes⚠️ REQUIRED: The absolute path to the project directory (e.g., /Users/username/project or D:\projects\myproject). This ensures logs are stored in the project directory at {projectPath}/.debug/debug.log, NOT in the user home directory. Use the current working directory of the project being debugged.
levelNoLog level: info, error, debug, warninfo
Behavior5/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 thoroughly explains behavioral traits: it's a read-only operation (no destructive effects), requires specific parameter handling (e.g., absolute path for projectPath), outputs a template for manual insertion, and includes detailed post-usage workflows and cleanup requirements. This covers safety, constraints, and operational context effectively.

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 overly verbose and includes extensive procedural instructions (e.g., post-insertion user communication, temporary modification marking) that are not core to the tool's purpose. While informative, this bloats the description with content better suited for external documentation, reducing conciseness and front-loading of key information.

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

Completeness5/5

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

Given the complexity of the tool (5 parameters, no output schema, no annotations), the description is highly complete. It covers purpose, usage guidelines, behavioral traits, parameter nuances, and integration with sibling tools like 'read_debug_logs'. It provides all necessary context for an AI agent to use the tool correctly, despite the lack of structured annotations or output schema.

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 input schema has 100% description coverage, so the baseline is 3. The description adds value by emphasizing the importance of the 'projectPath' parameter with specific instructions and warnings, and it implicitly clarifies the purpose of 'environment' and 'logMessage' through usage context. However, it doesn't provide additional semantics for all parameters beyond the schema's details.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description explicitly states the tool's purpose: 'Get a debug code template for a specific environment.' It specifies the verb ('Get') and resource ('debug code template'), and distinguishes it from sibling tools like 'read_debug_logs' by focusing on template generation rather than 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 instructions, including when to use it (for generating debug templates), when not to use it (e.g., not for direct logging with console.log()), and alternatives like 'read_debug_logs' for analyzing results. It also outlines prerequisites and post-usage steps, such as manual insertion and user communication.

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