Skip to main content
Glama

r2_open_file

Opens binary files for reverse engineering and analysis. Initiates basic function identification, with option to disable auto-analysis for large files to prevent timeouts.

Instructions

[Binary/reverse-engineering tool. Use when: disassembly, radare2, r2, debugging, vulnerability research, ELF/PE/SO/DEX analysis.] 【r2ai逆向工具】🚪 [会话管理] 打开二进制文件。默认执行基础分析 (a) 以快速识别函数。注意:对于大型文件 (>10MB),强烈建议将 auto_analyze 设为 false 以免超时。如需深度分析,可后续调用 r2_analyze_file 或使用 r2_run_command 执行 'aa'。 【触发场景】当用户询问二进制逆向分析、反汇编、漏洞挖掘、radare2命令执行、调试相关问题时,必须优先调用此工具。 【使用规则】调用前必须确认用户提供了目标文件的绝对路径,禁止捏造不存在的文件路径或命令结果,session_id 不再使用时必须关闭。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
file_pathYes二进制文件的完整路径
session_idNo可选:使用现有会话 ID,如果不提供则自动创建
auto_analyzeNo是否自动执行基础分析 (aa 命令)。默认为 true。对于大文件 (>10MB) 请设为 false。

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.0.3

TDQS

A4.2/5.0
Behavior4/5

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

With no annotations, the description carries the full burden. It discloses default basic analysis, the timeout risk for >10MB files, session management (must close), and a prohibition on fabricating results. It does not mention file-modification side effects or error behavior, but for an open-and-analyze tool this is largely adequate. A 4 is appropriate.

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 description is structured with sections but is verbose, including emojis, bilingual text, and some redundancy (e.g., repeating the 10MB hint found in the schema). The purpose is front-loaded, but extra formatting and duplication reduce clarity. It could be tightened without losing 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 complexity (3 params, no output schema), the description covers the essentials: when to use, what it does, parameter caveats, and session management. It doesn't specify return format or error handling, but these aren't required when no output schema exists. It is fairly complete for an agent to call it correctly.

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 coverage is 100%, so parameters are already documented. The description repeats the 10MB hint for auto_analyze (already in schema) and adds a rule about confirming absolute paths (also in schema). It adds minimal extra meaning, like the session-close note, but overall doesn't go beyond the schema enough to merit above baseline 3.

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 states a specific verb and resource ('打开二进制文件' - open binary file) and enumerates concrete use cases (disassembly, radare2, debugging, vulnerability research, ELF/PE/SO/DEX analysis). It also differentiates from siblings by explicitly directing deep analysis to r2_analyze_file or r2_run_command, making the purpose unmistakable.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It provides an explicit 'Use when' list, a trigger scenario, and clear rules (confirm absolute path, don't fabricate results, close sessions). It also names alternatives for deeper analysis and warns about auto_analyze for large files. This is comprehensive guidance on when and when not to use the tool.

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