Skip to main content
Glama

disassemble_function

Decode a native PE x86-64 function from an entry RVA by linear sweep to ret/iret or max_bytes, returning verified instructions for analysis.

Instructions

Disassemble a function starting at an RVA in a native PE (x86-64). Linear sweep from the entry RVA to the first terminal instruction (ret/iret) or max_bytes, whichever comes first — a PR-3.1 boundary heuristic (CFG-accurate bounds arrive with the call-graph in PR-3.2), so the function EXTENT is tagged provenance=inferred while the decoded bytes themselves are verified. Read-only on the binary. Writes a 'function' row into The Model when db_path/game_path is supplied and the binary is catalogued.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
rvaYesEntry RVA of the function.
db_pathNoOptional .autopsy.db for writeback.
game_pathNoOptional game dir; default .autopsy DB used if db_path omitted.
max_bytesNoSafety cap on sweep length (default 4096).
binary_pathYesPath to the PE (.exe/.dll).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.4

TDQS

A3.5/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does well: it discloses read-only access on the binary, the conditional Model writeback when db_path/game_path is supplied, and the provenance distinction (extent inferred vs. decoded bytes verified). It omits error/failure behavior and the concrete return shape, keeping it short of a 5.

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

Conciseness3/5

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

The core purpose is front-loaded, but the sentence is dense and includes internal roadmap references (PR-3.1, PR-3.2) that add noise for an agent without aiding invocation. Every clause about provenance is useful; the PR tags are not.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a non-trivial disassembler with no output schema and no annotations, the description covers the boundary heuristic, provenance tagging, read-only nature, and writeback trigger. It stops short of describing the returned data structure, which the absence of an output schema would ideally have motivated.

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 already 100%, so baseline is 3, but the description adds real meaning: it clarifies that max_bytes bounds the sweep and, crucially, explains the conditional write semantics of db_path/game_path ('when db_path/game_path is supplied and the binary is catalogued') beyond the schema's terse 'for writeback'.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb (disassemble) and resource (a function at an RVA) with scope constraints (native PE, x86-64). The boundary-heuristic detail implicitly separates it from a raw range disassembler like disassemble_range, but no sibling is named explicitly, so differentiation is inferential rather than stated.

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

Usage Guidelines2/5

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

The description explains the internal algorithm but never says when to choose this over disassemble_range or analyze_pe_full, nor any preconditions (e.g., binary must be a valid PE, catalogued for writeback). Usage is only implied by the verb.

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

Deploy Server

Other Tools