Skip to main content
Glama

analyze_function

Analyze a function in a binary at a given address or symbol to inspect its code and behavior. Useful for reverse engineering and debugging.

Instructions

Analyze function at current or specified address (af).

Args: address: Address or symbol (e.g., "0x401000", "sym.main") session_id: Session to use

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
addressNo
session_idNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

C2.7/5.0
Behavior1/5

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

No annotations are provided, so the description carries the full behavioral burden. It does not disclose what analysis is performed, whether state is modified, what permissions or session state are required, or any rate/side-effect behavior; it only names the target and session parameters.

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 front-loaded with the purpose and then lists the two arguments tersely. It is appropriately short and has no filler, though the terse Args format is minimal rather than fully structured.

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

Completeness2/5

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

An output schema exists, so return values need not be explained, and the description covers the two parameters at a basic level. However, for a zero-annotation tool with 40+ siblings, it lacks essential behavioral detail and guidance on how this analysis differs from alternatives.

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 0%, so the description must compensate for both parameters. It usefully defines address as an address or symbol with examples ("0x401000", "sym.main") and says session_id selects the session, but it omits default/null behavior and other address formats.

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?

The description names a specific verb and resource ("Analyze function") and states the address scope ("current or specified address"), so an agent can identify the operation. It does not differentiate from nearby siblings such as disassemble_function, get_function_info, or analyze_all, leaving the exact kind of analysis vague.

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?

It gives no explicit when-to-use guidance, no conditions for choosing this over disassemble_function, get_function_info, or analyze_all, and no prerequisites. The only usage clue is the parenthetical alias "(af)" and the address default.

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