Skip to main content
Glama
AstralVoidZ
by AstralVoidZ

ppsspp_wait_breakpoint

Read-only

Blocks until a breakpoint hit occurs, returning hit details. Use after arming a breakpoint; on timeout returns hit=false instead of an error.

Instructions

PURPOSE: Block until a breakpoint hit (any kind) — replaces polling gpu_stats errors as a hit probe.

USAGE: session_id; timeout_s default 30. Arm a breakpoint first via ppsspp_breakpoint (set or mem_set). Use when you only need to know a hit happened; call ppsspp_trace_memory_access instead to capture the hit scene (registers/backtrace) in one step.

BEHAVIOR: READ-ONLY. Subscribes to the cpu.stepping broadcast and holds NO session lock — concurrent reads/observes keep working, but do NOT submit step/pause/resume during the wait. An already-paused CPU returns hit=true + already_paused=true with a high-trust pc (a manual pause is indistinguishable from a hit).

RETURNS: {hit, already_paused, timeout_s, pc, reason, related_address, ticks} — timeout returns hit=false (pollable, not an error); reason/related_address may be null on some builds.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
timeout_sNoWait budget in seconds (default 30, clamped to [0.5, 300]). On timeout the tool returns hit=false — NOT an error — so callers can poll.
session_idYesActive session ID.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
pcYesProgram counter at the hit, hex string.
hitYesTrue when the CPU entered stepping (breakpoint hit, or it was already paused when the tool was called).
ticksYesCoreTiming tick count at the hit.
reasonYescpu.stepping broadcast reason (e.g. 'breakpoint' / 'memory.breakpoint').
timeout_sYesThe wait budget that was applied.
already_pausedYesTrue when the CPU was found in stepping state at arm time — the hit happened before this tool call.
related_addressYesBroadcast relatedAddress, hex string (memory breakpoints: the accessed address).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.7/5.0
Behavior5/5

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

Annotations declare readOnlyHint=true, and the description reinforces this with 'READ-ONLY' while adding substantial extra behavior: it subscribes to cpu.stepping, holds no session lock, warns against step/pause/resume during the wait, and explains the already-paused CPU edge case. This goes well beyond annotation coverage.

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 organized into PURPOSE, USAGE, BEHAVIOR, and RETURNS sections, front-loading the core purpose and keeping each sentence dense and relevant. Every section earns its place and no content is redundant with the schema.

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 definition covers the prerequisite, the decision between this and trace_memory_access, the locking/concurrency warning, the paused-CPU edge case, timeout semantics, and return field nullability. This is complete for a blocking wait tool with no hidden caveats left for the agent to discover by trial and error.

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%, with both session_id and timeout_s already described in detail including the default and clamping. The description's mention of 'session_id; timeout_s default 30' adds no meaningful information beyond the schema, so the baseline of 3 is appropriate.

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?

Purpose is precise: 'Block until a breakpoint hit (any kind)' names a specific verb, resource, and scope. It also differentiates itself from ppsspp_trace_memory_access and from polling gpu_stats, so an agent can distinguish it from closely related siblings.

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?

Explicitly states when to use it ('only need to know a hit happened'), names the alternative for richer capture, and gives a prerequisite ('Arm a breakpoint first via ppsspp_breakpoint'). It also explains timeout semantics as pollable rather than an error, leaving no ambiguity about acceptable usage.

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