Skip to main content
Glama
JeanExtreme002

PyMemoryEditor

Official

scan_value

Read-only

Scan a target process's memory for a specific value (Cheat Engine's first scan) and get a scan ID, match count, and sample addresses. Narrow results with refine_scan.

Instructions

Scan the target's memory for a value. The first step of the loop.

This is Cheat Engine's "First Scan". It returns a scan_id, a match count and a few sample addresses — not the addresses themselves, which routinely number in the tens of thousands. Narrow the set with refine_scan after the value changes in the target, and repeat until a handful remain; then read them with list_scan_results.

:param value_type: int, float, bool, str or bytes. :param value: the value to match. Hex is accepted for int ("0x64") and required for bytes ("DEADBEEF"). :param scan_type: exact (default), not_exact, bigger, bigger_or_exact, smaller, smaller_or_exact, between or not_between. :param end_value: the upper bound, required by between / not_between and rejected otherwise. :param bufflength: width in bytes — 4 for a typical int, 8 for a double. Leave at 0 for the default (int→4, float→8, bool→1) or, for str / bytes, to infer it from value.

Numeric widths are restricted to 1, 2, 4 or 8 for ``int``, 4 or 8
for ``float``, and 1 for ``bool``; anything else is refused rather
than half-supported. Text is capped, inferred or not — see
``server_info().limits``.

:param writable_only: restrict the scan to writable memory (the default). A value the program changes lives in writable memory, so this usually cuts the work and the false positives by an order of magnitude. Turn it off only when hunting constants.

A scan stops early at the server's result cap or time budget; when it does, the result sets partial and explains what to narrow. Refining a partial set can converge on the wrong address, because the right one may never have been in it.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
valueYes
end_valueNo
scan_typeNoexact
bufflengthNo
session_idYes
value_typeYes
writable_onlyNo

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?

Annotations only declare the generic read-only/idempotency profile; the description adds substantive behavior: it returns a scan_id, match count and sample addresses rather than the full address set, it can stop early at a result cap or time budget and set 'partial', and it warns that refining a partial set can converge on the wrong address. That is real operational context an agent must have.

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 and the loop are front-loaded, and the per-parameter block is genuinely needed given 0% schema coverage. It is longer than a two-line tool warrants and the bufflength paragraph is dense, but almost every sentence carries load.

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?

An output schema exists, yet the description still closes the loop on what comes back (scan_id, count, samples) and on the failure mode (partial results misdirecting a refine). For a 7-parameter stateful scan entry point with no schema documentation, nothing an agent needs to call it correctly is missing.

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 carries the entire burden and does: valid value_type tokens, hex format for int and bytes, the full scan_type enumeration, end_value's conditional requirement, bufflength's per-type widths and the 1/2/4/8 restriction, and the default/rationale for writable_only. Only session_id goes undocumented, and its meaning is unambiguous.

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 ('Scan the target's memory for a value') and frames it as the first step of a named loop. It is immediately distinguishable from refine_scan (narrowing) and list_scan_results (reading), so an agent can pick it without opening any schema.

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: scan first, refine_scan after the value changes, list_scan_results at the end. It also names the two alternative scan entry points implicitly (refine_scan, scan_pattern) and states the condition for using writable_only vs not ('turn it off only when hunting constants').

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