Skip to main content
Glama

Analyze Function

analyze_function
Idempotent

Build a complete dossier for a native function by symbol or address, including identity, body ranges, pseudocode, assembly, calls, references, strings, CFG blocks, and API boundary observations.

Instructions

Build a dossier for one native function identified by symbol or provider-returned address. Returns identity with complete inclusive analyzed body ranges or explicit unknown, provider-specific pseudocode and assembly, comments, calls, references, referenced strings/names, local CFG blocks, and available native API boundary observations. Ghidra terminal-call assumptions that may cut the analyzed body are reported in limitations with available callee identities.

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

Input Schema

NameRequiredDescriptionDefault
procedureYesA procedure name or address

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.9/5.0
Behavior4/5

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

Annotations declare idempotent=true, destructive=false and openWorldHint=false, but readOnlyHint=false is left unexplained; the description doesn't clarify why an analysis operation is not read-only (presumably analysis artifacts/caching). It does add genuine behavioral context beyond the annotations: unresolved identity is reported as "explicit unknown", and Ghidra terminal-call assumptions that may truncate the analyzed body are surfaced in limitations with callee identities. That failure-mode disclosure is valuable and not derivable from the structured fields.

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 definition is front-loaded with purpose before the long enumeration of return contents, and every clause describes something the agent actually receives (ranges, pseudocode, calls, references, CFG, limitations). The second sentence is dense and list-like, but it carries real information rather than filler, so the density is justified.

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?

With no output schema, the description correctly shoulders the burden of describing return values, and it does so in detail, including explicit handling of the unresolved/unknown case and provider-specific variation. The residual gap is that readOnlyHint=false is never reconciled with the analysis framing, leaving an agent unsure whether the call mutates session or binary state. For a one-parameter tool this is otherwise complete.

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% and the single parameter is already documented as "A procedure name or address", so the baseline is 3. The description's mention of "symbol or provider-returned address" adds only marginal nuance - that the address may come from another tool's output - without specifying accepted syntax, symbol formats, or behavior on ambiguous matches.

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 - "Build a dossier for one native function" - and constrains scope to a single function identified by symbol or provider-returned address. Enumerating the returned artifacts (body ranges, pseudocode, assembly, calls, references, CFG blocks, API boundary observations) makes it obvious this is the comprehensive single-function analysis tool, distinguishable from leaner siblings such as read_function_instructions or batch_decompile without opening their schemas.

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 only implied: it is the tool for deep single-function inspection, and the phrase "provider-returned address" hints that addresses from other tool responses are valid inputs. There is no explicit when-to-use versus when-not, and no named alternative for lighter needs (e.g. reading raw instructions only) even though such siblings exist. The agent must infer the routing decision.

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