Skip to main content
Glama

Find Runtime Writer

debug_find_writer
Destructive

Find the writer that corrupts a variable: temporarily watch the expression, resume the live target, and capture the first stop to reveal the responsible code.

Instructions

Temporarily watch a variable or debugger expression, resume an authorized live target, and capture the first resulting stop to identify the immediate writer candidate. Use this after a stopped-state diagnosis suggests a value was corrupted and runtime provenance is needed; do not use it for crash dumps or when resuming is unsafe. Adapters with DAP data-breakpoint support use that protocol directly; GDB 14/15 uses a bounded watch/rwatch/awatch command through DAP REPL because those releases do not advertise native data breakpoints. The tool removes only the temporary watch it created and never automatically continues through an unrelated stop.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesVariable child name or debugger expression to watch. Without variablesReference, the expression is resolved in frameId/current frame when supported. GDB fallback expressions must not contain control characters or line breaks.
frameIdNoOptional stopped frame used to resolve an expression; omit to use the current snapshot frame. Ignored by native DAP child resolution when variablesReference is supplied.
snapshotNoBounds for the evidence snapshot captured after execution stops.
threadIdNoStopped thread to resume and inspect; omit to use the debugger-selected stopped thread.
conditionNoOptional adapter-supported condition for native DAP data breakpoints. Intentionally rejected by the bounded GDB fallback.
sessionIdNoOptional DAP session ID. Omit to use the backward-compatible default session.
timeoutMsNoMaximum time in milliseconds to wait for a stop, exit, or termination after resuming.
accessTypeNoRequested watchpoint access mode. write is the normal choice when finding who corrupts a value; GDB maps these to watch/rwatch/awatch.write
hitConditionNoOptional adapter-supported hit-count condition for native DAP data breakpoints. Intentionally rejected by the bounded GDB fallback.
variablesReferenceNoOptional DAP variable-container reference when the adapter advertises native data breakpoints. Omit for the GDB watch-command fallback and pass a debugger-visible expression in name instead.
replaceExistingDataBreakpointsNoFor native DAP data breakpoints, temporarily replace existing MCP-managed watches when true. The GDB fallback never deletes unrelated CLI watchpoints and only removes its own temporary watch.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYes
beforeYes
statusYes
outcomeYes
guidanceYes
snapshotNo
strategyYes
installedYes
resolutionYes
writerFrameNo
hitConfirmedYes
cleanupWarningNo
writerCorrelationNo
priorDataBreakpointCountYes
replaceExistingDataBreakpointsYes

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. Addedv0.17.0

TDQS

A4.5/5.0
Behavior5/5

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

The description goes well beyond the annotations by explaining that the tool temporarily creates a watch, removes only that watch, never automatically continues through unrelated stops, and uses different mechanisms for DAP vs GDB 14/15. This gives the agent a clear model of side effects and safety boundaries.

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 three sentences with no filler: the first front-loads the core action, the second gives usage boundaries, and the third explains protocol behavior and cleanup guarantees. Every sentence adds distinct, necessary 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?

The description is complete for a complex tool with 11 parameters: it covers purpose, safe usage, exclusions, protocol differences, cleanup behavior, and the nature of the resulting stop. The schema and output schema fill in remaining structured details, leaving no critical gap for an agent deciding whether and how 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 coverage is 100%, so the schema already documents all parameter meanings. The description adds protocol-level context such as DAP vs GDB behavior and the bounded watch fallback, but most individual parameter semantics are already fully captured in the input schema itself.

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 states a specific action chain: temporarily watch a variable/expression, resume the target, and capture the first stop to identify the immediate writer candidate. It clearly distinguishes this from sibling tools by framing it as the corruption-provenance diagnostic and explicitly separating it from crash-dump use.

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?

It gives explicit when-to-use guidance: after a stopped-state diagnosis suggests corruption and runtime provenance is needed. It also provides explicit when-not-to-use guidance: not for crash dumps or when resuming is unsafe, though it does not name a specific sibling alternative to use instead.

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

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/SLP-DEV1/qwen-dap-mcp'

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