Skip to main content
Glama

Define code instructions

define_code

Converts raw bytes at specified addresses into code instructions in IDA, turning undefined data into disassemblable code for reverse engineering.

Instructions

Convert bytes to code instruction(s) at address(es).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
itemsYes
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.7/5.0
Behavior2/5

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

No annotations are provided, so the description carries the full behavioral burden, and it does not mention that this mutates the database/IDB, whether the change is reversible, what happens on invalid byte sequences at an address, or any permission requirements. It discloses only the bare conversion act.

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 compact sentence with the action front-loaded and no filler. However, the brevity tips into under-specification rather than true conciseness for a mutating tool.

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

Completeness2/5

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

An output schema exists, so return values need not be explained, but for a database-mutating tool with no annotations and thin parameter documentation, the description omits usage context, mutation semantics, and error behavior that an agent needs before invoking it.

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

Parameters2/5

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

Schema coverage is 50%, and the top-level 'items' parameter has an empty description in the schema. The description only alludes to 'address(es)' and adds no detail about the item object shape, hex/decimal formatting, 'start:end' bounds, or the instance_id targeting parameter, so it fails to compensate for the coverage gap.

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 and resource: converting bytes into code instruction(s) at given addresses. This distinguishes it from the sibling make_data (bytes to data) and define_func, though the differentiation from those siblings is left implicit rather than stated.

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?

No when-to-use guidance, no mention of prerequisites, and no routing to alternatives such as make_data (the inverse operation) or undefine/disasm. The agent must infer context entirely from the name and siblings.

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