Skip to main content
Glama

r2_analysis_hints

Fix disassembly errors and improve readability by managing analysis hints. Adjust number bases, set architecture/bits, override jumps or opcodes, or remove hints.

Instructions

[Binary/reverse-engineering tool. Use when: disassembly, radare2, r2, debugging, vulnerability research, ELF/PE/SO/DEX analysis.] 【r2ai逆向工具】🔧 [分析提示] 管理分析提示 (Analysis Hints)。用于手动修正 R2 的分析错误,或优化反汇编显示。 当反汇编结果看起来不对(如代码被当成数据)、立即数格式难以理解(如需要看 IP 地址/十进制)、或控制流中断时使用。 操作说明:

  • 'list' (ah): 列出当前地址的提示。

  • 'set_base' (ahi): 修改立即数显示进制 (value='10'十进制, '16'十六进制, 's'字符串, 'i'IP地址)。

  • 'set_arch' (aha): 强制指定后续代码的架构 (value='arm', 'x86')。

  • 'set_bits' (ahb): 强制指定位数 (value='16', '32', '64')。

  • 'override_jump' (ahc): 强制指定 Call/Jmp 的跳转目标地址 (修复间接跳转)。

  • 'override_opcode' (ahd): 直接用自定义字符串替换当前指令显示的文本。

  • 'remove' (ah-): 清除当前地址的所有提示。 【触发场景】当用户询问二进制逆向分析、反汇编、漏洞挖掘、radare2命令执行、调试相关问题时,必须优先调用此工具。 【使用规则】调用前必须确认用户提供了目标文件的绝对路径,禁止捏造不存在的文件路径或命令结果,session_id 不再使用时必须关闭。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
valueNo参数值。例如进制类型('10', 's')、架构名、跳转目标地址或替换的指令字符串。
actionYes提示操作类型
addressNo可选:目标地址(默认为当前光标位置)。
session_idYes会话 ID

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.0.3

TDQS

A3.9/5.0
Behavior3/5

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

No annotations are present, so the description carries the burden. It discloses the effect of each operation including the destructive remove/all-hints-clearing, and adds session/path rules. It does not state whether modifications persist to disk or only the session, what is returned, or whether an open session is required.

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 action table is useful and earns most of its length, but there is redundancy: the top 'Use when' list overlaps with the later trigger scene, and the broad RE label is not necessary for a hints-management tool. Structured with headings, but not tight.

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 7-action, no-annotation, no-output-schema tool, it covers actions, value semantics, session handling, and anti-hallucination rules. The main gaps are the lack of any description of the return/output format and the persistence model of hint modifications, which leaves some uncertainty for an agent.

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

Parameters5/5

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

Schema coverage is 100%, and the description adds substantial extra meaning: each action is mapped to concrete value examples, set_base radix options are specified, address defaults to cursor, and session lifecycle is explained. This removes most ambiguity in action-specific parameter usage.

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 and resource: managing R2 analysis hints, with a clear list of sub-operations. It is distinguishable from sibling analysis tools because it targets hints/correction and display optimization, though the opening 'binary/reverse-engineering tool' label is broad and overlaps with many siblings.

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?

Provides concrete when-to-use conditions: when disassembly looks wrong, immediate values are confusing, or control flow breaks, and lists RE trigger scenarios. It lacks explicit when-not-to-use or named alternatives, and the rule to 'must call first' for all RE questions is overbroad since this tool only manages hints.

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