Skip to main content
Glama

ida_decompile

Decompile the function at a given address or name into Hex-Rays pseudocode to inspect game logic and reverse-engineer behavior.

Instructions

Hex-Rays pseudocode for the function containing the address. This is the main tool for understanding game logic.

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": {
      "target": "<target>"
    },
    "name": "ida_decompile"
  }
}

Input Schema

NameRequiredDescriptionDefault
targetYesAddress or name: '0x401000', 'sub_401000', a defined name, 'libUE4.so+0x1234', or a unique part of a function name.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

B3.2/5.0
Behavior2/5

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

With no annotations at all, the description carries the full behavioral burden and does not meet it. It never states that the operation is read-only, that it requires an open database/session (siblings ida_open/ida_close imply session state), or what happens when the address does not resolve to a decompilable function or the Hex-Rays decompiler is unavailable.

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 short sentences with the result type front-loaded and no filler. The second sentence is soft framing rather than hard instruction, but it is short enough to earn its place.

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 a single-parameter tool with full schema coverage and no output schema, the description covers what is returned but omits prerequisites (active session, decompiler availability) and failure behavior. It is adequate for the happy path and thin on everything else.

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 the accepted address/name forms are already documented. The phrase 'the function containing the address' adds a small but real clarification — any interior address resolves to its enclosing function — which is why it sits at the baseline 3 rather than lower.

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 first sentence names a specific artifact ('Hex-Rays pseudocode') and its scope ('the function containing the address'), so an agent knows exactly what comes back. It stops short of explicitly contrasting with the disassembly sibling ida_disasm, which would have made it a 5.

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?

'This is the main tool for understanding game logic' signals a preferred-use context, but no when-not conditions or named alternatives (e.g. ida_disasm for raw assembly, ida_function for metadata) are given. Usage is implied rather than spelled out.

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