Skip to main content
Glama

Decompile Subgraph

decompile_subgraph
Idempotent

Traverse a bounded call-graph from a root procedure via BFS or DFS and batch-decompile visited procedures, returning pseudocode, assembly, callers, callees, strings, and struct offsets in one call.

Instructions

Traverse the bounded call-graph subgraph from a root procedure (BFS or DFS) and return decompiled pseudocode, assembly instructions, callers, callees, referenced string constants, and inferred base+displacement struct offsets for every visited procedure in a single batch call. Eliminates N+1 round-trip decompilation overhead; preserves cycle edges explicitly without executing the target.

Example tool call

This call uses example arguments supplied in the tool’s input schema.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "document": null,
      "max_depth": 2,
      "max_nodes": 25,
      "procedure": "main",
      "traversal": "bfs",
      "include_assembly": true
    },
    "name": "decompile_subgraph"
  }
}

Input Schema

NameRequiredDescriptionDefault
entryNoAlias for procedure: root procedure symbol name or 0x-prefixed hexadecimal entry address.
documentNoOptional document name for multi-document providers; defaults to null for the active binary target.
max_depthNoMaximum call-graph traversal depth from the root procedure (0..10, default 2).
max_nodesNoMaximum number of unique procedures to decompile in the subgraph (1..100, default 25).
procedureNoRoot procedure selector: exact symbol name or 0x-prefixed hexadecimal entry address.
traversalNoCall-graph traversal order: breadth-first ('bfs', default) or depth-first ('dfs').
include_assemblyNoWhether to include disassembled instruction lines for each node in the subgraph (default true).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.7/5.0
Behavior4/5

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

With annotations already declaring openWorldHint=false, idempotentHint=true and destructiveHint=false, the description still adds real context: traversal is bounded, cycle edges are preserved rather than followed infinitely, results come back in one batch, and the target is not executed. It stops short of describing cost, truncation behavior when max_nodes is hit, or why readOnlyHint is false for a read-shaped operation.

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?

Two dense sentences, front-loaded with the action and return payload, then the performance rationale. The long clause list is heavy but each item describes a distinct output, so nothing is filler.

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?

Seven parameters with no output schema, but the description enumerates the return payload in enough detail to stand in for a missing output schema, and it explains the batching semantics. Minor gaps: no mention of what happens at depth/node bounds or how partial results are signaled.

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 echoes traversal order (BFS/DFS) and the assembly toggle, but adds no detail beyond the schema on depth/node-limit interactions or how the procedure/entry alias pair is resolved.

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 names a specific verb (traverse) and resource (bounded call-graph subgraph from a root procedure) and enumerates exactly what is returned: pseudocode, assembly, callers, callees, string constants, and struct offsets. It is clearly distinct from a single-function decompiler, though it never names a specific sibling such as batch_decompile to sharpen the boundary.

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?

Usage is implied rather than stated: the N+1 round-trip elimination and the 'bounded'/'single batch call' phrasing tell an agent this is for multi-procedure sweeps, but there is no explicit when-to-use or when-not-to-use rule and no named alternative for single-procedure decompilation.

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

Deploy Server

Other Tools