Skip to main content
Glama

Define functions from bytes

define_func

Marks specified addresses as functions in IDA, inferring end bounds automatically unless an explicit range is given.

Instructions

Define functions; IDA infers bounds unless end is provided.

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.6/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. It does disclose one useful trait — that IDA infers bounds unless 'end' is supplied — but says nothing about permissions, whether existing definitions are overwritten, or what happens on invalid addresses.

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 no filler, and the default-bound behavior is front-loaded. However, its brevity comes at the cost of the context the tool actually needs.

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?

For a mutation tool with no annotations and a required parameter whose schema description is blank, the description is too thin. An output schema exists, so return values need not be explained, but batching semantics and usage context should be.

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 50%, and the required 'items' parameter has an empty description in the schema, leaving its array-of-objects shape unexplained. The description partially compensates by clarifying the addr/end relationship, but does not explain the batching nature of 'items'.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose3/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a verb+resource ('Define functions') but the operation is opaque — defining a function from bytes is not self-explanatory, and the description offers no frame like 'converts raw bytes at an address into a recognized function'. It does not distinguish itself from siblings such as define_code or analyze_function.

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, when-not-to-use, or prerequisite guidance is given, and no sibling is named as an alternative despite define_code and analyze_function being adjacent. The agent must infer the entire context of use.

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