Skip to main content
Glama
JeanExtreme002

PyMemoryEditor

Official

scan_pattern

Read-only

Scan non-shared process memory for byte patterns (AOB) with ? wildcards to find structures or code whose address moves but bytes don't. Returns a scan_id.

Instructions

Scan for a byte pattern (an AOB scan) with ? wildcards.

The IDA / Cheat Engine technique for finding a structure or a piece of code whose address moves between builds but whose surrounding bytes do not: "48 8B ? ? 00 00 89". Returns a scan_id like scan_value.

:param pattern: space-separated hex bytes, where ? or ?? is a single-byte wildcard.

Note that this covers the target's readable, non-shared regions — heap, stack and anonymous mappings. File-backed code (a .dll / .so / .dylib image) is a shared mapping and is deliberately excluded, so patterns matching instructions inside a loaded module will not be found here. Reach module code through process_info's module bases plus a static offset instead.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
patternYes
session_idYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.6/5.0
Behavior4/5

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

Annotations already cover the safety profile (readOnly, non-destructive, openWorld, non-idempotent), so the bar is lower. The description adds genuinely valuable behavioral scope: the scan covers only the target's readable non-shared regions (heap, stack, anonymous mappings) and excludes shared/file-backed mappings, which directly affects whether a call can succeed.

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?

Front-loaded with the core purpose, then rationale, then the scope caveat, so an agent can stop reading early. Slightly verbose with an embedded RST ':param:' block, but every sentence carries 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?

With an output schema present, return values need no explanation, and the description still notes the returned scan_id. Combined with the pattern syntax and the region-coverage caveat, an agent has everything needed to call this correctly and interpret a partial result.

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 0%, so the description must carry the burden. It fully specifies the pattern parameter's syntax ('space-separated hex bytes, where ? or ?? is a single-byte wildcard') with a concrete example, and session_id is a self-evident session handle. This compensates well for the missing schema 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?

States a specific verb and resource ('Scan for a byte pattern (an AOB scan) with ? wildcards') and immediately disambiguates from the sibling scan_value by noting it returns a scan_id 'like scan_value'. An agent can identify this as the address-independent pattern-matching primitive without opening the 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?

Explains when this technique applies (address moves between builds, surrounding bytes do not) and, critically, when it does NOT: file-backed module code is deliberately excluded and should be reached via process_info's module bases plus a static offset. This names both the exclusion and the alternative path.

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