Skip to main content
Glama
AstralVoidZ
by AstralVoidZ

ppsspp_gpu_stats

Read-onlyIdempotent

Query GPU counters like FPS, vblank rate, and timing to debug PPSSPP emulator performance.

Instructions

PURPOSE: Query GPU counters — fps, vblanks per second, timing info.

USAGE: session_id. The CPU must be RUNNING; paused, the MCP pre-probe returns CPU_STATE_ERROR instead of hanging — which doubles as the cheapest paused-CPU probe.

BEHAVIOR: READ-ONLY.

ON TIMEOUT: the error names WHY it timed out -- expected_stall (the CPU was stepping, so no frame is coming), pairing_broken (a broadcast arrived meanwhile, so ticket pairing failed), or no_producer (nothing was broadcast at all, so the emulator is not producing frames -- check for a modal dialog blocking it). A CPU_FREEZE_SUSPECTED is re-checked against the frame heartbeat first: if no frames are arriving it is reported as WS_TIMEOUT with a no-producer attribution, NOT as a CPU freeze.

RETURNS: {fps, vblanks_per_second, info, timing, raw, text}.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
session_idYesActive session ID.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
fpsYesFrames per second. None if PPSSPP didn't return it (e.g., no game running, or response shape differs).
rawYesRaw `gpu.stats.get` response from PPSSPP.
infoYesGPU info dict (vendor / name / version, etc.).
textYesUnified text representation: 'fps={FPS} vblanks={VBLANKS} info_keys={N} timing_keys={N}'.
timingYesGPU timing dict (frame / block / vertex timing, etc.).
vblanks_per_secondYesVBlanks per second. None if PPSSPP didn't return it.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.4/5.0
Behavior5/5

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

Beyond the readOnly/idempotent annotations, it discloses a full timeout taxonomy (expected_stall, pairing_broken, no_producer) and the escalation rule that CPU_FREEZE_SUSPECTED is demoted to WS_TIMEOUT with no-producer attribution when the frame heartbeat is silent. That is behavioral context an agent cannot get from the annotations or schema, plus an operational remedy hint (check for a modal dialog).

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Sectioned PURPOSE/USAGE/BEHAVIOR/ON TIMEOUT/RETURNS with the core verb front-loaded, and each block carries distinct information. The RETURNS list slightly duplicates the existing output schema, which is the only mild 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?

For a zero-arg-complexity read tool with an output schema already present, the description covers everything an agent needs: what it returns, the required CPU state, and how to interpret every failure mode. Preconditions and error semantics are fully specified.

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% for the single session_id parameter, so the schema already documents it fully. The description restates 'USAGE: session_id' and adds a state precondition, but no format, sourcing, or scoping detail beyond the schema, so baseline 3 applies.

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?

States a specific verb and resource — 'Query GPU counters — fps, vblanks per second, timing info' — and enumerates exactly which counters. An agent can distinguish it from the sibling ppsspp_gpu_record (which captures/records rather than queries) without opening either schema.

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?

Gives a hard precondition ('The CPU must be RUNNING') and even a non-obvious secondary use ('doubles as the cheapest paused-CPU probe'), which is real when-to-use guidance. It stops short of naming alternative tools for the same data, so it falls just below the top band.

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