Skip to main content
Glama

disassemble_function

Read-only

Disassemble a whole function into labeled blocks with named call targets to get exact machine instructions. Use when precise assembly matters over decompiled C.

Instructions

Disassemble a whole function by blocks, with L_<addr>: labels and named call targets. Use it when exact instructions matter; for C use decompile, for a few instructions disassemble.

Input Schema

NameRequiredDescriptionDefault
bytesNoAdd the raw-bytes column (default false).
addressYesEntry, any address inside it, or a name.
max_instrsNoMaximum instructions to return (default 400, max 2000).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.1

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true and openWorldHint=false, so the safety profile is covered. The description adds genuinely useful behavior beyond that: output is organized into blocks with address labels and resolved call target names, which is the key expectation for callers. It omits truncation behavior, though the max_instrs cap is documented in the schema.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two sentences, front-loaded with the verb and output shape, then the routing rule. Nothing redundant and nothing padding.

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?

For a read-only three-parameter tool with full schema coverage and no output schema, the description covers what the tool does, how output is shaped, and when to prefer siblings. It could note the instruction cap consequence (truncated results for large functions), but that is already in the schema.

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%, and all three parameters (bytes, address, max_instrs) carry their own defaults and limits in the schema. The description adds no parameter-level meaning beyond noting whole-function scope, so the baseline 3 applies.

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?

States a specific verb (disassemble) plus resource and scope (a whole function by blocks) and even characterizes the output format via `L_<addr>:` labels and named call targets. That distinguishes it from the sibling `disassemble` (few instructions) and `decompile` (C output).

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?

Explicitly names both alternatives and the conditions that select them: exact instructions → this tool, C code → decompile, a few instructions → disassemble. The agent has no inference left to make about tool choice.

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