Skip to main content
Glama
schuay

gdb and rr Debugging

watch

Set a watchpoint to halt execution when an expression's value changes. Used to detect data modifications like memory corruption or unexpected variable mutations.

Instructions

Set a watchpoint that stops execution when an expression changes (GDB 'watch').

Watchpoints detect when data changes, not where execution reaches. Useful for tracking memory corruption, unexpected variable mutations, etc.

expression: any GDB expression — variable, memory location, dereferenced pointer e.g. "x", "buf[4]", "*0x601020", "obj->field" mode: "write" — stop when expression is written (default, GDB 'watch') "read" — stop when expression is read (GDB 'rwatch') "access" — stop on any read or write (GDB 'awatch')

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
modeNowrite
expressionYes
session_idYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

Despite no annotations, the description transparently explains the watchpoints' behavior: they stop execution on data changes, not code reach. It details the three modes (write, read, access) and clarifies scope (any GDB expression). It does not mention limitations like hardware watchpoint count, but is sufficiently transparent for typical use.

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 concise and well-structured, starting with the core purpose and then providing necessary details in a scannable format. Every sentence adds value without redundancy.

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 tool's moderate complexity (3 parameters, no annotations, output schema exists), the description is complete. It covers what the tool does, when to use it, parameter semantics, and behavioral nuances. The output schema handles return values, so no further explanation needed.

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

Parameters5/5

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

With 0% schema description coverage, the description fully compensates by explaining both parameters in detail: 'expression' with examples (e.g., "x", "buf[4]", "*0x601020") and 'mode' with each value's effect (write, read, access). This adds essential meaning beyond the bare schema.

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 clearly states the tool sets a watchpoint that stops execution when an expression changes, distinguishing it from breakpoints that stop at code locations. It specifies the resource (expression) and the action (watch), making purpose unambiguous.

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 description provides useful usage contexts (tracking memory corruption, unexpected variable mutations) and implicitly contrasts with breakpoints by noting 'not where execution reaches.' However, it does not explicitly state when not to use or name alternative tools like breakpoint.

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/schuay/gdb-mcp'

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