Skip to main content
Glama

set_type

Idempotent

Define structs, enums, or typedefs and apply types at addresses so decompiled fields get names; on functions it sets the prototype. Previews until dry_run=false.

Instructions

Define a struct, enum or typedef, or apply a type at an address so decompile names its fields; at a function, type sets the prototype. To infer a class use class_layout. Checked first; dry run until dry_run=false.

Input Schema

NameRequiredDescriptionDefault
varNoFunction variable to name/type (`a1`, `local_58`).
nameNoStruct, enum or typedef to define, or `var`'s new name.
sizeNoSize past the last field, or an enum's width (4 or 8).
typeNoType to apply or typedef (`Player *`), a prototype, or alone C declarations.
fieldsNoStruct fields, each `offset:name:type` (`0x1c:mp:u32`).
valuesNoEnum values, each `name:value` (`Run:1`).
addressNoData global to type, or a function for a prototype or `var`.
dry_runNoPreview only; false applies.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.1

TDQS

A4.2/5.0
Behavior4/5

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

The description adds useful behavioral context beyond the annotations: it says inputs are checked first and that the operation remains a dry run until dry_run=false. Combined with annotations declaring idempotent=true and destructiveHint=false, this gives a clear safety profile, though it does not describe failure or rollback behavior.

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 compact and front-loaded: the main operations come first, followed by the class_layout alternative and the dry-run rule. Every sentence carries actionable information without filler.

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

Completeness4/5

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

For a complex 8-parameter tool with no output schema, the description explains the major modes, the dry-run behavior, and the class_layout alternative. It is largely complete, though it omits what the tool returns and how validation failures are surfaced.

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 100% and the parameter descriptions already explain the formats for fields, values, type, address, and dry_run in detail. The description adds mode-level context, such as applying type at an address versus at a function, but does not add much parameter syntax 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 states specific operations: defining structs/enums/typedefs, applying types to addresses, and setting function prototypes. It also explicitly distinguishes this tool from class_layout by saying to use class_layout to infer a class.

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?

It names class_layout as the alternative for class inference and gives the key safe-usage rule to dry run until dry_run=false. It does not clarify when to use set_type versus set_name for variable naming, which is a remaining gap.

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