Skip to main content
Glama

Procedure Pseudo Code

procedure_pseudo_code
Idempotent

Decompile an analyzed procedure by symbol name or normalized address into provider-specific pseudocode, with optional fresh independent analysis and evidence details for reverse engineering.

Instructions

Decompile one analyzed procedure by symbol name or provider-normalized address. To request a fresh independent attempt, use analysis: independent_fresh when binary_session reports independent_decompile for this provider operation; otherwise it is refused. The independent result may have different analysis context. Ghidra also accepts file-offset:0x... selectors and falls back to a unique source-file mapping when a 0x-prefixed number resolves to no procedure; existing analysis addresses take precedence and ambiguous mappings fail explicitly. A space-qualified address such as ram:0x... avoids that fallback; inspect_native_load_image reports Ghidra's observed default address space. Returns provider-specific pseudocode, never original source or cross-provider text equivalence, and may return null. When supplied, raw_result.pseudocode_absence distinguishes provider-failure from not-in-export; absence of that fact means unknown. Request procedure_assembly when instruction precision matters. Ghidra no-return assumptions may cut the analyzed body; Evidence limitations report observed terminal calls and available callee identities. Select detail summary to retain complete Evidence and receive text availability and counts; inspect_analysis_view summary or native/pseudocode pages read the original observation without decompiling again. Complete remains the default.

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": {
      "procedure": "<procedure>"
    },
    "name": "procedure_pseudo_code"
  }
}

Input Schema

NameRequiredDescriptionDefault
detailNocomplete returns the complete analysis Evidence inline. summary retains that complete Evidence in this session and returns its inspect_analysis_view summary; inspect pages, items or facets through normalized_result.parent_evidence_id.
analysisNo
documentNo
procedureYes

Output Schema

NameRequiredDescriptionDefault
subjectYes
providerYes
authorityYes
locationsYes
operationYes
confidenceYes
parametersYes
raw_resultYes
environmentYes
evidence_idYes
limitationsYes
evidence_linksYes
predicate_typeYes
analysis_profileYes
caller_input_pathNo
normalized_resultYes
caller_input_pathsNo
relationship_coverageYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.25.0

TDQS

A4.7/5.0
Behavior5/5

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

Beyond annotations, it discloses nullable returns, provider-specific pseudocode with no source equivalence, pseudocode_absence semantics, and Ghidra body-truncation limits. It also explains the independent-fresh refusal condition and differing analysis context, without contradicting readOnlyHint=false or destructiveHint=false.

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 purpose is front-loaded and most sentences carry operational detail, but the paragraph is dense and some Ghidra fallback details are packed into long clauses. It is appropriately comprehensive for the complexity, though it could be easier to scan.

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?

The definition covers selectors, fresh-analysis preconditions, return nullability, absence signaling, body truncation, detail modes, and alternative ways to read retained evidence. With an output schema present, the main remaining gap is the undocumented document parameter rather than return-value explanation.

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?

The procedure selector is richly documented with symbol, provider-normalized address, Ghidra file-offset fallback, precedence, ambiguity failure, and space-qualified address syntax; analysis and detail are also explained. However, the optional document parameter is never mentioned, and schema coverage is only 25%, so one parameter remains opaque.

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 opens with a specific verb and resource ('Decompile one analyzed procedure') and specifies the two selector forms. It also explicitly routes instruction-level needs to procedure_assembly, so the tool is distinguishable from a key sibling.

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

Usage Guidelines5/5

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

It states the independent_fresh precondition and refusal behavior, and names procedure_assembly and inspect_analysis_view as alternatives for precision and cached summary reading. That is explicit when-to-use guidance, including when not to request a fresh analysis.

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