Skip to main content
Glama

r2_run_command

Run any Radare2 command in a specified session to disassemble, debug, and analyze binaries for vulnerability research across ELF, PE, SO, and DEX formats.

Instructions

[Binary/reverse-engineering tool. Use when: disassembly, radare2, r2, debugging, vulnerability research, ELF/PE/SO/DEX analysis.] 【r2ai逆向工具】⚙️ [通用命令] 在指定会话中执行任意 Radare2 命令。支持所有 r2 命令。 【触发场景】当用户询问二进制逆向分析、反汇编、漏洞挖掘、radare2命令执行、调试相关问题时,必须优先调用此工具。 【使用规则】调用前必须确认用户提供了目标文件的绝对路径,禁止捏造不存在的文件路径或命令结果,session_id 不再使用时必须关闭。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
commandYesRadare2 命令
session_idYes会话 ID

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.0.3

TDQS

B3.3/5.0
Behavior3/5

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

With no annotations, the description carries the transparency burden and does contribute useful behavioral context: it warns against fabricating paths/results, requires the session to be closed when unused, and notes that arbitrary r2 commands are supported. Still, it does not disclose that arbitrary commands may have write/side effects, how errors are surfaced, or what the output format is.

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 core statement is concise and front-loaded, but the description contains redundancy and metadata noise (bracketed tags, emoji, repeated trigger scenarios). The information is adequate but could be tightened into a cleaner directive without losing meaning.

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?

For an arbitrary-command execution tool with no output schema and no annotations, the description covers several operational essentials: when to use it, path confirmation, and session cleanup. It is incomplete, though, because it does not explain how a session_id is obtained, what output the caller should expect, or the potential consequences of running arbitrary r2 commands.

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 100%, so the baseline is 3. The description adds no real semantic detail beyond the schema: it does not explain command syntax expectations, whether r2 commands are passed verbatim, or how the session_id relates to an opened file.

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 clearly states the tool executes arbitrary Radare2 commands in a specified session and declares support for all r2 commands. It identifies the resource (session) and action (run command) unambiguously, though it does not explicitly differentiate itself from specialized siblings like r2_disassemble or r2_decompile_function.

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

Usage Guidelines3/5

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

The description gives explicit trigger scenarios and a rule to prioritize this tool for reverse-engineering/radare2 questions, plus preconditions such as confirming an absolute path. However, it provides no exclusions or guidance on when to choose specialized sibling tools instead, and the blanket 'must call for disassembly' is potentially misleading given dedicated r2_disassemble/r2_decompile_function tools exist.

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