Skip to main content
Glama
AstralVoidZ
by AstralVoidZ

ppsspp_query

Read-onlyIdempotent

Query PSP emulator state: game status, CPU registers, backtrace, threads, modules, and HLE function tracking via session-based actions.

Instructions

PURPOSE: Aggregate game-state queries — game_state, registers (all or one), backtrace, threads, modules, and function-list management (funcs/func_scan/func_add/func_remove).

USAGE: action + session_id; 'register' needs name; func_scan/func_remove need address; top_n defaults to 100 (pass 0 for the full list — hle.func.list can reach 700+KB).

BEHAVIOR: READ-ONLY. Lookups only — func_add/func_remove mutate the debugger function list. backtrace/threads/func_* REQUIRE the CPU paused (pause first, or use get_pc); RUNNING-state PC/isCurrent is LOW trust.

RETURNS: {action, data, trust_level} — data shape depends on the action.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameNoFunction name (func_add only; ignored by func_remove because PPSSPP's hle.func.remove protocol does not accept a name parameter).
top_nNoLimit the number of entries returned for 'funcs' / 'func_scan' actions (default 100). 0 = no limit — hle.func.list can reach 700+KB, pass 0 only when the full list is genuinely needed.
actionYesQuery action. Valid values: - 'game_state': PPSSPP game status (paused / game title). - 'registers': all CPU registers (GPR + FPU + VFPU). - 'register': single register by name (MIPS ABI name like 'a0'/'v0'/'t9', or 'pc'/'hi'/'lo'). - 'backtrace': HLE call stack (thread optional). - 'threads': PSP thread list (safe: stepping → query → resume). - 'modules': list all loaded HLE modules. - 'funcs': list registered HLE function tracking entries. - 'func_scan': scan HLE functions in a 64KB range starting at address (requires address; CPU must be stepping). - 'func_add': add HLE function tracking (name? and/or address?). - 'func_remove': remove HLE function tracking (address required; PPSSPP protocol only accepts address, no name).
threadNoThread ID (backtrace action only; None = current).
addressNoFunction address as a hex string (e.g. '0x08804000'). Required for func_remove and func_scan.0x0
session_idYesActive session ID.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
dataYesRaw result payload.
textYesUnified text representation. Populated for action='registers' with grouped '── GPR ──' / '── FPU ──' / '── VFPU ──' headers and ' name = 0xVAL' lines. Empty for other actions (use the structured `data` field).
actionYes'game_state' / 'registers' / 'backtrace' / 'threads' / 'modules' / 'funcs' / 'func_scan' / 'func_add' / 'func_remove'.
trust_levelYesTrust annotation (threads + pc only). Lowercase enum value: 'high' (stepping-verified) / 'medium' / 'low'.

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?

Goes well beyond the annotations: discloses that func_add/func_remove mutate the debugger function list despite the read-only framing, warns that running-state PC/isCurrent is low trust, and describes the return envelope {action, data, trust_level}. Annotations already cover the broad read-only/destructive safety profile, so this added context is meaningful.

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?

Four labeled sections (PURPOSE, USAGE, BEHAVIOR, RETURNS) pack a lot of information into about 70 words with no filler. The purpose and usage are front-loaded, and every sentence adds operational 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?

For a multi-action tool with 6 parameters and an output schema, the description covers purpose, invocation pattern, per-action requirements, prerequisites, and return shape. The per-action details are in the schema's enum descriptions, and the description fills the gaps around state requirements and payload size.

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

Parameters4/5

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

Schema coverage is 100% and the schema already documents every parameter, so the baseline is 3. The description adds cross-parameter dependencies ('register' needs name, func_scan/func_remove need address) and the top_n=0 size warning/hle.func.list 700+KB note, which are not inferable from individual property descriptions.

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 high-level operation ('aggregate game-state queries') and enumerates all ten concrete actions it dispatches (game_state, registers, backtrace, threads, modules, func_*). This makes it clearly distinguishable from sibling tools like ppsspp_read_memory or ppsspp_get_pc without needing to inspect their schemas.

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?

Provides concrete usage constraints: 'register' needs a name, func_scan/func_remove need an address, and the paused-CPU requirement for backtrace/threads/func_* with a 'pause first, or use get_pc' hint. It does not explicitly name alternative tools or state when-not-to-use, so it stops short of the highest bar.

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