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

set_register

Set a register value across an address range or non-contiguous ranges in a Ghidra program to define or modify its execution context.

Instructions

Set or assume a register value over an address range or selection.

This writes a Ghidra program-context register value. Pass a single `target`,
optionally with `end` or `length`, or pass non-contiguous `ranges` entries
with `start` plus optional `end` or `length`.

Args:
    register: Register name.
    value: Integer register value, for example `0`, `13`, or `0x40000000`.
    program: Required Ghidra project path or name to target.
    target: Address, exact label, or function name. Required unless
        `ranges` is supplied.
    end: Inclusive end address for a contiguous selection.
    length: Byte length for a contiguous selection starting at `target`.
    ranges: Optional list of range objects, each with `start` plus optional
        `end` or `length`, for non-contiguous selections.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
endNo
valueYes
lengthNo
rangesNo
targetNo
programYes
registerYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.0

TDQS

A4.4/5.0
Behavior3/5

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

With no annotations, the description must carry the behavioral burden. It explicitly states 'This writes a Ghidra program-context register value,' disclosing the mutation. However, it does not mention side effects like overwriting existing values, reversibility, or error conditions. This is adequate but leaves room for deeper disclosure.

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

Conciseness5/5

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

The description is front-loaded with purpose and then organizes the two modes clearly before a concise arg list. Every sentence adds value—no filler or repetition. It is appropriately sized for a tool with 7 parameters and two distinct call patterns.

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?

Covers all 7 parameters, explains both usage modes, and provides concrete examples. Since an output schema exists, return-value details are not needed. An agent has everything required to call the tool correctly without additional lookups.

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 coverage is 0%, but the description provides detailed semantics for every parameter: explains `register` and `value` with examples, defines `program` as the target path, and clarifies the conditional requirements among `target`, `end`, `length`, and `ranges`. This fully compensates 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?

Description opens with 'Set or assume a register value over an address range or selection,' using a specific verb and resource. It clearly distinguishes the two invocation modes (contiguous vs. ranges) and is unique among siblings (no other tool sets registers), so an agent can immediately identify its purpose.

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?

Description explains when to use `target` versus `ranges`, and explicitly states that `target` is required unless `ranges` is supplied. It also clarifies the optional `end`/`length` relationships. While it doesn't name alternatives (there are none), the guidance is contextually sufficient for correct selection.

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