Skip to main content
Glama

debug_run

Runs a program to completion through a debugger and returns all stdout/stderr/console output; use logpoints for printf-style debugging without modifying source.

Instructions

Launch a program with no stops, let it run to completion, and return all stdout/stderr/console output. Optionally inject logpoints (breakpoints with logMessage) for printf-style debugging without modifying source. Use for 'what does this script actually do?' cases where you don't need to inspect intermediate state.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "adapter": "<adapter>",
      "program": "<program>"
    },
    "name": "debug_run"
  }
}

Input Schema

NameRequiredDescriptionDefault
cwdNoWorking directory for the program
envNoEnvironment variables
argsNoProgram arguments
adapterYesAdapter type to use (e.g. 'python', 'node')
programYesPath to the program to debug
timeoutNoTotal wall-clock timeout for the whole run in milliseconds (default: 60000)
logpointsNoLogpoints to emit per-hit messages without pausing execution
adapterConfigNoOverride adapter config inline

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.19

TDQS

A4/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does well: it discloses the run-to-completion execution model, that logpoints emit messages without pausing execution, and where logpoints are a substitute for source modification. It omits what happens when the timeout fires (kill vs. return partial output), whether an exit code is reported, and that the program runs with real side effects on the filesystem and network.

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?

Three sentences, front-loaded with the execution model, then the logpoint capability, then the routing rule. No filler, no restatement of the tool name, and each sentence carries distinct information.

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

Completeness4/5

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

For an eight-parameter tool with a nested adapterConfig object and no output schema, the description covers the return value (all console output) and the key behavioral mode (non-interactive). Remaining gaps are exit status and timeout termination behavior, which are meaningful but secondary for an agent deciding whether to call it.

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 cwd, env, args, adapter, program, timeout, logpoints, and adapterConfig, including the timeout default. The description adds intent-level meaning for the logpoints concept (printf-style debugging without editing source) but nothing for the remaining seven parameters, so it sits at the documented baseline.

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?

States a specific execution model: launch a program, let it run with no stopping, and return all stdout/stderr/console output. That clearly separates it from interactive siblings like debug_launch or step, though it never names them explicitly. The extra clause about logpoint injection further pins down what the tool does.

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

Usage Guidelines4/5

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

The final sentence gives a concrete selection rule — use it for 'what does this script actually do?' cases where intermediate state does not need inspection — which implicitly excludes interactive debugging. It does not name a specific alternative (e.g. debug_launch with breakpoints) or describe prerequisites, so it stops short of a full routing statement.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.