Skip to main content
Glama

ida_set_type

Applies a C declaration at a target address to define function prototypes or data types for accurate IDA Pro disassembly and decompilation.

Instructions

Apply a C declaration at an address — a function prototype or a data type, e.g. 'int __fastcall f(void *self, int idx)'.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "target": "<target>",
      "declaration": "<declaration>"
    },
    "name": "ida_set_type"
  }
}

Input Schema

NameRequiredDescriptionDefault
targetYesAddress or name: '0x401000', 'sub_401000', a defined name, 'libUE4.so+0x1234', or a unique part of a function name.
declarationYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

B3.1/5.0
Behavior2/5

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

No annotations are supplied, so the description carries the full behavioral burden for a mutation of the IDB. It does not say whether an existing type is overwritten, whether the change requires ida_save to persist, whether it affects subsequent decompilation output, or what happens on a malformed declaration.

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?

A single front-loaded sentence with the core meaning first and an inline example that earns its place by illustrating the declaration format. Nothing is redundant.

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 two-parameter mutation tool with no annotations and no output schema, the description covers the essential purpose and gives the declaration example. It falls short on mutation consequences, persistence, and return/error behavior, which matter here since annotations supply none of that.

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%: 'target' is well documented with accepted address/name formats, while 'declaration' has no schema description. The description partially compensates by showing a concrete prototype example ('int __fastcall f(void *self, int idx)'), but gives no syntax rules for data-type declarations or error behavior.

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 concrete verb (apply) and resource (C declaration at an address) and clarifies with 'function prototype or a data type', which separates it from name-only operations like ida_rename. It never explicitly names a sibling it is not, so the differentiation is inferable 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 guidance on when to choose this over ida_rename, ida_struct, or ida_comment, nor any prerequisites (e.g. whether the target function must already exist or be decompiled). The only implied usage is the act of applying a declaration, which an agent could guess from the name alone.

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