Skip to main content
Glama

Get instruction

instruction_get
Read-only

Retrieve structured JSON for a WebAssembly instruction by mnemonic or binary opcode, including opcode bytes, category, stack signature, and trap conditions.

Instructions

Fetch one WebAssembly instruction by mnemonic (i32.add, br_if) or binary opcode (0x6a, 0xfd 0x89 0x02) as structured JSON: opcode bytes, category, introducing version, stack type signature, validation/execution prose anchors + spec URLs, and traps — the runtime conditions under which it traps (each with the spec's canonical trap name; empty + can_trap: false for instructions that never trap). Provide mnemonic or opcode (mnemonic wins if both match).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
opcodeNoBinary opcode as hex bytes, e.g. `0x6a`, `6a`, or multi-byte `0xfd 0x89 0x02`. Exact match. Used when `mnemonic` is absent or doesn't match.
versionNoWebAssembly spec version to query. `latest` (default) is the current served version; `main` is the upstream working draft.latest
mnemonicNoInstruction mnemonic, e.g. `i32.add`, `br_if`, `local.get`. Case-insensitive. Exact match.
Behavior4/5

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

The annotations already declare readOnlyHint=true, and the description adds value by detailing the output fields (opcode bytes, category, version, traps, etc.). It does not contradict annotations. However, it does not discuss authentication or rate limits beyond what is implied by annotations.

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?

The description is two sentences with no wasted words. The main purpose is front-loaded, and details about output fields follow. Each sentence adds value.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Despite no output schema, the description enumerates all expected output fields (opcode bytes, category, version, stack signature, validation/execution prose anchors, spec URLs, traps). This is complete for a single-instruction fetch tool with 3 optional parameters.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema already documents all parameters well. The description adds extra semantics: 'mnemonic wins if both match' and clarifies opcode format (hex bytes). This provides useful context beyond the schema.

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 explicitly states the tool fetches one WebAssembly instruction by mnemonic or binary opcode, clearly distinguishing it from siblings like instruction_list (lists all) and instruction_search (searches). The verb 'Fetch' and resource 'instruction' are specific.

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

Usage Guidelines4/5

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

The description provides clear disambiguation (mnemonic wins if both match) and explains when opcode is used. However, it does not explicitly state when not to use this tool or list alternatives beyond the sibling tools, which is a minor gap.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/xyzzylabs/wasm-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server