Skip to main content
Glama
JeanExtreme002

PyMemoryEditor

Official

refine_scan

Read-only

Narrow an existing memory scan result set by comparing values again. Use after changing a value in the process to collapse thousands of candidates to a few addresses.

Instructions

Narrow an existing result set. The second step, repeated.

This is Cheat Engine's "Next Scan", and it is what makes the whole workflow work: change the value in the target (take damage, spend a coin), then keep only the addresses that changed to match. Two or three rounds usually collapse tens of thousands of candidates to one.

It re-reads the addresses already in the set rather than walking memory again, so it is orders of magnitude faster than a fresh scan and cannot find addresses the original scan missed. Each refine returns a new scan_id; the previous set stays live, so a refine that narrows too far (down to zero) can be retried from the one before it.

:param scan_id: the set to narrow. :param scan_type: comparison to apply — the same names scan_value takes. For str / bytes sets only exact / not_exact are available. :param value: the value to compare against. :param end_value: upper bound for between / not_between.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
valueNo
scan_idYes
end_valueNo
scan_typeNoexact

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.9/5.0
Behavior5/5

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

Goes well beyond the annotations. It discloses that each refine returns a NEW scan_id, that the prior result set remains live, and that shrinking to zero is recoverable — behaviorally important and consistent with idempotentHint=false and readOnlyHint=true. It also quantifies expected convergence (two or three rounds) and the performance profile versus a fresh scan.

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?

Purpose is front-loaded and the body is dense with usable detail, but the framing line 'and it is what makes the whole workflow work' and 'The second step, repeated.' add rhetorical padding without new information. Every other sentence earns its place.

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?

With an output schema present, return values need not be re-explained, and the description already covers the key one (new scan_id). Combined with full parameter semantics, workflow guidance, and the retry/lineage model for previous scan sets, an agent has everything needed to invoke this correctly.

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?

Schema description coverage is 0%, so the description must carry the load, and it does: scan_id is the set to narrow, scan_type is the comparison sharing scan_value's names with a str/bytes restriction to exact/not_exact, value is the comparison target, and end_value is the upper bound for between/not_between. All four params are given meaning absent from the 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?

States a specific verb and resource (narrow an existing result set) and positions it precisely as the follow-up to a fresh scan. It names the sibling whose scan_type vocabulary it shares (scan_value) and explains the core distinction: it re-reads existing addresses rather than walking memory, so it cannot find what the original scan missed.

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?

Gives an explicit workflow trigger (change the value in the target — take damage, spend a coin — then keep addresses that changed to match) and an explicit exclusion (it cannot find addresses the original scan missed, so use a fresh scan for that). It also documents the retry path: the previous set stays live when a refine narrows to zero.

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