Skip to main content
Glama
I-CAN-hack
by I-CAN-hack

read_data

Read raw memory or typed data at an address or label. Get hexdumps, decoded integers, or structured JSON for structs, arrays, and unions.

Instructions

Read raw memory bytes or structured Ghidra data at an address or label.

Raw mode returns a hexdump/xxd-style text view that includes both hex bytes
and printable ASCII by default. Pass `format` such as `u32be` with `count`
to decode raw integer tables as JSON. Structured mode returns compact JSON
for the defined data at, or containing, the resolved address, preserving
struct fields, arrays, unions, and pointer pointees without the older
metadata wrapper. `concise` remains accepted as a legacy alias for
`structured`.

If `length` is omitted in raw mode, the tool uses the remaining size of the
selected defined data item when available, otherwise it defaults to 64
bytes. If `count` is provided for a typed raw format, `length` is ignored
and the byte count is derived from `count * item_size`. Supplying `length`,
`count`, or a non-default `format` implies raw mode, so callers do not also
need to set `mode="raw"`.

Args:
    target: Address, exact label name, or exact function name to inspect.
    program: Required Ghidra project path or name to target.
    mode: One of `structured` or `raw`. `concise` is accepted as a legacy
        alias for `structured`.
    length: Optional byte count for raw mode.
    format: Raw output format: `hexdump`, `u8`, `u16be`, `u16le`, `u32be`,
        `u32le`, `u64be`, `u64le`.
    count: Optional number of typed raw values to read.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
modeNostructured
countNo
formatNohexdump
lengthNo
targetYes
programYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.0

TDQS

A4.5/5.0
Behavior5/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It thoroughly explains output formats (hexdump vs. JSON), the legacy 'concise' alias, default length behavior, the interaction between length/count/format, and the mode implication rules. This is comprehensive and leaves no significant behavioral ambiguity.

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?

The description is long but every sentence contributes essential information. It is front-loaded with the purpose and then systematically covers modes, defaults, and parameter details. While slightly verbose, it avoids redundancy and maintains a logical structure, earning a high but not perfect score.

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?

Given the tool's complexity (two modes, multiple formats, parameter interactions) and the absence of annotations, the description is exceptionally complete. It covers all necessary calling conventions, defaults, and output behavior, and because an output schema exists, it does not need to detail return structures. Nothing critical is missing for correct invocation.

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?

The input schema has zero description coverage (0%), so the description must fully compensate for all six parameters. It does so in the 'Args' section, defining target, program, mode, length, format, and count with specific meanings and acceptable values. This is a textbook example of parameter documentation exceeding schema limitations.

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 clearly states a specific action ('Read raw memory bytes or structured Ghidra data') with a resource ('an address or label'), distinguishing it from siblings like disassemble or decompile. It also immediately clarifies the two modes (raw and structured), leaving no ambiguity about the tool's core function.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

While the description provides excellent guidance on when to use raw vs. structured mode internally, it does not explicitly compare this tool to sibling tools such as disassemble, decompile, or memory_map. An agent can infer when to use it from the purpose, but no alternatives or exclusions are named, so the guidance is implicit rather than explicit.

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