Skip to main content
Glama

disassemble_function

Disassemble or pseudo-decompile a single function by name or 0x address using radare2 to inspect binary logic before analysis.

Instructions

Disassemble (pdf) and/or pseudo-decompile (pdc) one function by name or 0x address using radare2.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "path": "<path>",
      "target": "<target>"
    },
    "name": "disassemble_function"
  }
}

Input Schema

NameRequiredDescriptionDefault
modeNodecompile
pathYes
targetYesFunction name (e.g. main, sym.check) or 0x address
max_linesNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

C2.7/5.0
Behavior2/5

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

No annotations are supplied, so the description carries the full burden, and it leaves out key behavioral facts: it does not say the operation is read-only, whether the binary must first be analyzed by radare2 (an 'aaa'-style prerequisite), what the output looks like, or whether max_lines silently truncates results. Naming the underlying pdf/pdc commands is modest added context but not enough to compensate for the missing operational details.

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?

A single front-loaded sentence with no filler, leading with the verb and scope. The radare2 command abbreviations in parentheses are compact and informative, though they are jargon that an unfamiliar agent may not decode.

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?

For a 4-parameter tool with no annotations and no output schema, the description omits prerequisites (analysis of the binary), the meaning of two undocumented parameters, output format, and truncation behavior. It is a reasonable one-line summary but falls well short of what an agent needs to invoke this reliably.

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

Parameters2/5

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

Schema description coverage is only 25%, so the description needs to compensate and does not. It restates the target format (already documented in the schema) and loosely implies the mode values via 'and/or', but says nothing about what 'path' refers to, what max_lines does or that it truncates, or how 'both' differs in output volume from the single-mode options.

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 states a specific verb pair (disassemble/decompile), a precise resource (one function), the addressing modes (name or 0x address), and the underlying engine (radare2). It implicitly separates itself from listing tools like list_functions by scoping to a single function, but it never explicitly names or contrasts a sibling.

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 explicit when-to-use or when-not guidance, and no pointer to alternatives such as list_functions for discovering targets or extract_strings for a cheaper first pass. The only implied workflow is that the caller must already know the function name or address, which is left for the agent to infer.

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