Skip to main content
Glama

Open Binary

open_binary
Idempotent

Opens and validates local binaries, app bundles, archives, or analysis databases for reverse engineering, including headerless DOS COM and raw binary formats.

Instructions

Open a local executable, application bundle, archive, JavaScript, source map, plist, or analysis database after validation. format=dos-com explicitly interprets 1..65280 headerless bytes as a DOS COM analysis image. format=raw-binary interprets headerless bytes with a required architecture and entry_point; file offset 0 maps at that address. Omission preserves header-based detection. provider_id selects one deep provider or deterministic auto selection; the binding remains stable until close or an explicit switch, with no failure fallback. Reopening the same target and profile retains its active database and metadata edits. Changing target or provider can retire the active Ghidra database and discard its ephemeral edits, including before a later provider call fails; retained investigation records are historical and do not restore those edits. For editable Ghidra persistence across processes, set REA_GHIDRA_CHECKPOINT_DIR to a private absolute directory in the startup environment (stock ELF/PE/Mach-O on Linux/macOS; restart MCP). Opens and normal close then restore/save automatically; no separate persistence tool or runtime setting update is needed. An optional analysis snapshot is imported atomically and must match the binary identity, concrete provider, and canonical analysis profile exactly; importing into a session with metadata mutations requires closing and reopening it first. Switching targets preserves investigation records. A failed admitted open reports error.details.selection_at_failure, target_at_open_completion, and provider_id_at_open_completion. The target summary and provider id are the selected binary and bound provider when that attempt settled, or null when absent. Later calls can change the selection, so use binary_session for current state. Call close_binary to release engine resources; reset_investigation explicitly clears investigation records.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "path": "<path>"
    },
    "name": "open_binary"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathYesAbsolute local filesystem path for the analysis target; relative paths are rejected.
formatNoExplicit interpretation: dos-com or raw-binary (headerless), gamecube-dol (GameCube/Wii DOL, never auto-detected), or esp-flash-image (an ESP flash dump read with flash_offset and partition_table_offset). Omission preserves header-based detection.
entry_pointNoCaller-supplied load and entry address (0xhex). File offset 0 is mapped here. Required with format=raw-binary; rejected otherwise. Optional with format=gamecube-dol; must equal the DOL header entry.
provider_idNoExact deep-analysis provider ID, or automatic selection when omitted.
architectureNoCaller-supplied CPU family. Required with format=raw-binary; rejected otherwise. format=gamecube-dol takes powerpc from the header, so it must be omitted.
flash_offsetNoFlash address (0xhex) of the dump's first byte, when it does not start at flash address 0. Only with format=esp-flash-image.
snapshot_pathNoAbsolute local filesystem path for the analysis snapshot; relative paths are rejected.
partition_table_offsetNoFlash address (0xhex, a multiple of 0x1000) of the partition table, which disables the table scan. Only with format=esp-flash-image.

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.25.0

TDQS

A4.6/5.0
Behavior5/5

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

Beyond the annotations, the description discloses detailed operational behavior: stable provider binding with no failure fallback, reopening behavior, retirement of the active Ghidra database, discarding of ephemeral edits, checkpoint environment requirements, and atomic snapshot identity checks. This is exactly the kind of side-effect and lifecycle context that annotations alone do not carry.

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 purpose is front-loaded and most sentences carry necessary operational detail for a complex tool. The description is dense and would benefit from clearer segmentation, but the length is largely justified by the number of formats, persistence rules, and failure behaviors it must cover.

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?

For an eight-parameter tool with an output schema, the description covers target types, format modes, provider lifecycle, persistence, snapshot import, failure reporting, cleanup, and current-state alternatives. The output schema can carry return-value details, and the description supplies enough context to invoke the tool correctly.

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?

The schema already documents all eight parameters with full description coverage, establishing a baseline of 3. The description adds cross-parameter meaning such as the dos-com byte range, raw-binary offset mapping, required architecture/entry_point relationship, provider binding semantics, and snapshot matching requirements, though it does not elaborate every format-specific parameter.

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 uses a specific verb, "Open," and enumerates the relevant target classes, including executables, bundles, archives, JavaScript, source maps, plists, and analysis databases. It also distinguishes explicit headerless formats from header-based detection, so an agent can identify the tool's scope precisely.

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?

It gives concrete usage rules for explicit formats, omission-based detection, provider selection, checkpoint persistence, snapshot import constraints, and cleanup via close_binary or reset_investigation. It does not explicitly frame when to choose open_binary over a sibling reopen-style tool, so the alternative guidance is clear but not complete.

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