set_type
Defines structs, enums, typedefs and prototypes, names fields, and applies types at addresses so decompiled code shows meaningful names; validates changes first, applying only when dry_run is false.
Instructions
Define a struct, enum or typedef, name fields of a struct or class_layout class, or apply a type at an address so decompile names its fields; at a function, type sets the prototype. Checked first; dry run until dry_run=false.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "set_type"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| var | No | Variable or field to name/type (`a1`, `local_58`, a debug-info name, `field_0x10`). | |
| name | No | Struct, enum, typedef or class, or `var`'s new name. | |
| size | No | Size past the last field, or an enum's width (4 or 8). | |
| type | No | Type to apply or typedef (`Player *`), a prototype, or alone C declarations. | |
| fields | No | Each `offset:name[:type]` (`0x1c:mp:u32`), merged by offset. | |
| values | No | Enum values, each `name:value` (`Run:1`). | |
| address | No | Data global to type, or a function for a prototype or `var`. | |
| dry_run | No | False applies. | |
| replace | No | Drop fields not restated. |