Skip to main content
Glama
Heretek-RE

re-angr

by Heretek-RE

build_cfg

Build a control-flow graph from a binary to analyze program structure and detect virtual machine dispatchers by identifying blocks with high incoming edge counts.

Instructions

Build a control-flow graph of path (optionally one function).

Args: path: PE / ELF / MachO to analyze function: optional function name (e.g. "main") — when given, only the CFG of that function is returned; when None, the full program CFG is returned.

Returns::

{"path": "...",
 "function": "..." | null,
 "nodes": [{"addr": N, "size": M, "successors": [...]}],
 "edges": [{"src": N, "dst": M, "kind": "fall-through|jmp|call|ret"}]}

The CFG is the first thing an analyst needs for VM detection (high incoming-edge count on a single block = dispatcher candidate) and for binary comprehension in general.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYes
functionNo
Behavior3/5

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

No annotations provided so description carries full burden. It describes the return format and use case but omits performance, limitations, or error conditions. Partially adequate.

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 concise, front-loaded with the main action, and structured with Args/Returns sections. Every sentence adds value without redundancy.

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

Completeness3/5

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

Given no annotations or output schema, the description covers purpose, parameters, and return but lacks details on side effects, permissions, or prerequisites. Adequate but not complete.

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 description coverage is 0%, but the description compensates by explaining 'path' as PE/ELF/MachO and 'function' as optional with default None behavior, plus return format. Adds significant meaning.

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 it builds a control-flow graph of a binary path, optionally for a single function. This distinguishes it from sibling tools like symbolic_exec and reaching_definitions.

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 explains when to use the CFG (first thing for VM detection, binary comprehension) but does not explicitly state when not to use or mention alternatives.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Heretek-RE/re-angr'

If you have feedback or need assistance with the MCP directory API, please join our Discord server