Skip to main content
Glama
drvcvt
by drvcvt

r2_command

Execute allowed radare2 commands on a binary to retrieve raw output for analysis, disassembly, info, search, and configuration. Directly access radare2's functionality for binary inspection.

Instructions

Execute a radare2 command directly and return the raw output. Only commands starting with these prefixes are allowed: a (analysis: aa, aaa, afl, af, ag, ax), p (print: pd, px, pf, pi), i (info: ij, iS, iE, ii, iz), s (seek), f (flags), / (search: /x, /R), e (eval/config), af (analysis functions), ag (analysis graphs), ax (analysis xrefs), CC (comments), dr (debug registers), om (open file map). Blocked characters: ; | > < ` ! ~ { } ( ) $ #!.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
commandYesThe r2 command to execute (must be on the allowlist)
binary_pathYesAbsolute path to the binary file
analysis_levelNoAnalysis level to run before executing the commandaaa

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A3.6/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 full burden. It discloses the allowlist, blocked characters, and raw output behavior, which is useful. However, it does not mention that some allowed commands (e, CC, dr, om) may mutate state, nor does it describe error handling on invalid commands. This is a moderate gap for a potentially side-effecting tool.

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 dense and front-loaded, with no filler. It has some redundancy: the 'a' prefix already includes af, ag, and ax, but these are listed again separately. This is a minor structural wart in an otherwise efficient definition.

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?

The tool has no output schema and no annotations, and the description covers purpose, constraints, and output. However, it omits error behavior, state-change warnings, and any guidance for choosing it over specialized siblings. Given the deliberate risk of raw command execution, a more complete description is warranted.

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

Parameters4/5

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

Schema coverage is 100%, so the baseline is 3. The description adds value by enumerating the exact allowed prefixes and blocked characters, going beyond the schema's generic 'must be on the allowlist' for the command parameter. It also avoids needing to restate binary_path or analysis_level since their schema descriptions and defaults are sufficient.

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 a specific verb and resource: execute a radare2 command and return raw output. The allowlist further defines the tool's scope, making it easy to distinguish from specialized sibling tools like disassemble or list_functions.

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?

There is no guidance on when to use this tool versus the many specialized siblings. The allowlist and blocked characters are invocation constraints, not usage routing. An agent is left to infer that this should only be used when no dedicated tool exists, which is not stated.

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