Skip to main content
Glama

get_function_cfg

Extract control flow graphs from functions in IDA Pro to analyze basic blocks, instructions, and their connections for reverse engineering.

Instructions

Get the control flow graph of a function, including all basic blocks and their connections. Returns basic blocks with their instructions and successor/predecessor relationships.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
addressYesAddress of the function to analyze

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
blocksYes
entry_blockYes
exit_blocksYes
function_nameYes
function_addressYes
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It mentions what the tool returns ('basic blocks with their instructions and successor/predecessor relationships') but lacks details on permissions, rate limits, error handling, or whether it's a read-only operation. For a tool with no annotation coverage, this leaves significant gaps in understanding its behavior.

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 description is concise and front-loaded, with two sentences that directly state the purpose and output. There is no wasted text, though it could be slightly more structured by explicitly separating purpose from return details. Every sentence earns its place by providing essential information.

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?

Given the tool's moderate complexity (analyzing function control flow), the presence of an output schema (which likely covers return values), and high schema description coverage, the description is reasonably complete. It specifies what is retrieved and the return structure, but could improve by addressing behavioral aspects like error cases or usage context, especially since no annotations are provided.

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?

The input schema has 100% description coverage, with the 'address' parameter documented as 'Address of the function to analyze.' The description does not add any additional meaning or context beyond this, such as format examples or constraints. Baseline score of 3 is appropriate since the schema adequately covers parameter semantics.

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: 'Get the control flow graph of a function, including all basic blocks and their connections.' It specifies the verb ('Get'), resource ('control flow graph of a function'), and scope ('basic blocks and their connections'), distinguishing it from siblings like 'decompile_function' or 'disassemble_function' which focus on different aspects of function analysis.

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 provides no guidance on when to use this tool versus alternatives. It does not mention prerequisites, exclusions, or compare it to similar tools like 'decompile_function' or 'disassemble_function' that might serve related purposes in analyzing functions. Usage is implied only by the purpose statement.

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/icryo/ida-pro-mcp'

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