Skip to main content
Glama

Instruction query by mnemonic/operand

insn_query
Read-only

Search instructions by mnemonic and operand filters across functions, segments, or address ranges in IDA to locate specific code patterns.

Instructions

Query instructions with mnemonic/operand filters and scoped scans.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queriesYesInstruction query with mnemonic/operand filters and scoped scan
instance_idNoOptional database instance id. If omitted, use the current target.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv20261008.0.1

TDQS

C2.9/5.0
Behavior2/5

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

Annotations already declare readOnlyHint=true, so the safety profile is covered. The description adds almost nothing beyond that: it does not disclose that scopeless scans require allow_broad, that scanning is bounded by max_scan_insns, or that results are capped at 5000 — all behaviors that materially affect how the tool is invoked.

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?

A single well-formed sentence with no filler and the core capability front-loaded. It is efficiently sized, though the brevity tips into under-specification rather than tight conciseness.

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 read-only query tool whose schema is fully documented and which has an output schema covering return values, the minimum an agent needs is present. However, the interaction between allow_broad, max_scan_insns, and the count/offset pagination window is left entirely to the schema, which is a meaningful gap for a nested-query tool.

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%, with every one of the 15 nested query fields documented inline (mnem, op0-op2, op_any, start/end/func/segment, count, offset, include_disasm, include_fn, allow_broad, max_scan_insns). The description only restates 'mnemonic/operand filters and scoped scans,' adding no meaning beyond the schema, so the baseline 3 applies.

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?

States a specific verb ('Query') and resource ('instructions') and names the filter axes (mnemonic/operand) plus scope. It is clear what the tool does, but it never distinguishes itself from the many sibling query tools (func_query, entity_query, xref_query, imports_query), so an agent must infer 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 Guidelines2/5

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

There is no when-to-use guidance, no mention of alternatives, and no stated prerequisites. The phrase 'scoped scans' hints that scoping matters but never says when a scopeless scan is appropriate or that allow_broad gates it.

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