Skip to main content
Glama
drvcvt
by drvcvt

rzil_il_ast

Retrieve the RzIL intermediate language AST for instructions at a given address, providing a structured, typed expression tree with bitvector operations for deeper binary analysis.

Instructions

Get the RzIL intermediate language AST for instructions at a given address. Each instruction is lifted to a typed RzIL expression tree with bitvector operations. This is unique to Rizin — r2 ESIL only has flat string expressions.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
countNoNumber of instructions to lift (default 5)
addressNoAddress to disassemble from (hex). Defaults to entry point.
binary_pathYesAbsolute path to the binary file

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A4.2/5.0
Behavior4/5

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

With no annotations provided, the description carries the burden of behavioral disclosure. It explains that each instruction is lifted into a typed RzIL expression tree with bitvector operations, which meaningfully describes the tool's output and transformation behavior. It does not explicitly state side-effect-free behavior, but the 'Get' phrasing and AST framing make the read-only intent reasonably clear.

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 two sentences with no filler. The first sentence front-loads the core action and target, and the second sentence adds valuable technical context about the return type and uniqueness. Every word earns its place.

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?

The description is complete for a read-oriented tool with three well-documented parameters and no output schema. It conveys the core return shape (typed RzIL expression tree) and positions the tool relative to ESIL, which helps an agent select and invoke it. A small gap is that it does not describe behavior for edge cases like invalid addresses, but this is not critical given the schema coverage and tool name.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, and the input schema already documents binary_path, address, and count with descriptions and defaults. The tool description adds no parameter-specific detail beyond mentioning 'instructions at a given address,' which aligns with the address parameter but is already captured in the schema. Baseline 3 is appropriate.

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 the tool's purpose: obtaining the RzIL intermediate language AST for instructions at a given address. It specifies the resource and the operation, and differentiates itself from ESIL by emphasizing typed expression trees versus flat string expressions, which helps distinguish it from sibling tools like esil_expression.

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?

The description provides clear context on when this tool is appropriate: when a structured, typed RzIL AST is needed rather than flat ESIL strings. It explicitly contrasts itself with r2 ESIL, giving an implicit alternative, though it does not name specific sibling tools or state exclusions for other analysis tools like disassemble or decompile_function.

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