Skip to main content
Glama

Verify Terminal Restoration after RSP

debug_bridge_restore
DestructiveIdempotent

Restore pre-debug terminal state after external GDB disconnects: confirm target shell readiness, reapply and verify saved stty -g, then validate a shell marker before releasing the lease.

Instructions

After external GDB disconnects and the target returns to its shell, explicitly confirm readiness and supply the pre-debug stty -g value. Applies and reads back that value, then verifies a fresh shell marker before releasing the lease. Never injects RSP detach. Failure or ten-second timeout closes the Session.

Input Schema

NameRequiredDescriptionDefault
ownerYesSecret management capability, 32..128 characters; distinct from the generated TCP connection token.
bridge_idYesOpaque bridge_id returned by debug_bridge_start; not a Session reference.
tty_stateYesExact stty -g value recorded before preparing the target, 1..512 printable bytes. No guessed defaults.
confirm_shell_readyYesMust be true only after independently ending RSP and returning to the target shell. The probe itself is shell input.

Output Schema

NameRequiredDescriptionDefault
statusYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.4.2

TDQS

A4.3/5.0
Behavior5/5

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

Annotations already disclose destructive/openWorld/idempotent traits, and the description adds important behavior: it applies and reads back the stty value, verifies a fresh shell marker before releasing the lease, never injects RSP detach, and closes the Session on failure or ten-second timeout. That gives the agent concrete consequences beyond the annotation flags.

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 dense and front-loaded, starting with the triggering condition and then covering the operational sequence and failure behavior. Every sentence contributes useful 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 output schema and annotation coverage, the description supplies the remaining critical context: when to run it, what it verifies before lease release, what it will not do, and what happens on failure or timeout. Nothing essential for correct invocation appears missing.

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 all four parameters are already fully documented. The description reinforces the meaning of tty_state and confirm_shell_ready in context, but it does not add new constraints or explain owner/bridge_id beyond what the schema provides.

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 names a specific restoration-verification operation: confirming shell readiness, applying/read-back of the saved stty -g value, verifying a fresh shell marker, and releasing the lease. It is clearly distinct from generic close/list tools, though it does not explicitly name an alternative sibling.

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 a clear triggering condition: use this after external GDB disconnects and the target returns to its shell. It also states an exclusion, 'Never injects RSP detach,' but does not explicitly route the agent to a specific alternative tool.

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