Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/mrexodia/ida-pro-mcp/llms.txt

Use this file to discover all available pages before exploring further.

Type tools give you programmatic access to IDA’s local type system. You can declare new structs, enums, and typedefs from C source strings, apply precise types to functions, globals, and local or stack variables, let Hex-Rays infer types automatically, and query the full type catalog with filtering and pagination.
Several tools — infer_types, set_type with kind: "local", and set_type with kind: "function" — require the Hex-Rays decompiler plugin. Operations on globals and stack variables work without it.

declare_type

Parse one or more C type declarations and register them in the IDB’s local type library.
decls
string | string[]
required
A C declaration string or a list of them. Standard C syntax is accepted, including struct, union, enum, typedef, and function pointer declarations. Semicolons are optional.
Returns DeclareTypeResult[]
"struct Config { uint32_t flags; uint32_t version; char name[64]; };"

enum_upsert

Create a new enum or extend an existing one by upserting members. Existing members with matching name and value are skipped; conflicts are reported without modifying the enum.
queries
EnumUpsert | EnumUpsert[]
required
Returns EnumUpsertResult[]
Add error-code enum
{
  "name": "ErrorCode",
  "members": [
    { "name": "ERR_OK",      "value": 0 },
    { "name": "ERR_INVALID", "value": 1 },
    { "name": "ERR_TIMEOUT", "value": 2 }
  ]
}

set_type

Apply a type to a function, global variable, local decompiler variable, or stack frame variable. The kind field is inferred automatically in most cases.
edits
TypeEdit | TypeEdit[]
required
Returns SetTypeResult[]
{
  "addr": "0x401000",
  "signature": "int __cdecl validate_serial(const char *input, size_t len)"
}

type_apply_batch

Apply multiple type edits with optional stop_on_error behavior and receive an aggregate result.
batch
TypeApplyBatch
required
Returns TypeApplyBatchResult

infer_types

Infer and apply likely types at the given addresses. Tries Hex-Rays inference first, then falls back to existing IDA type info, and finally uses item size as a last resort.
addrs
string | string[]
required
One or more addresses or symbol names to infer types for.
Returns InferTypeResult[]
Infer types at several addresses
["0x401000", "0x404020", "g_config"]

read_struct

Read the field values of a struct instance from memory at a given address. The struct type can be specified explicitly or auto-detected from the type information already applied to the address.
queries
StructRead | StructRead[]
required
Returns ReadStructResult[]
Read a Config struct at a known address
{
  "addr": "0x404020",
  "struct": "Config"
}

search_structs

Search the local type library for structs and unions whose names contain the given substring (case-insensitive).
filter
string
required
Substring to search for in structure names.
Returns SearchStructResult[]

type_query

Query the full local type catalog with flexible filtering, sorting, and optional projection of member details and related types.
queries
TypeQuery | TypeQuery[]
required
Returns TypeQueryResult[]
List all structs, largest first
{
  "kind": "struct",
  "sort_by": "size",
  "descending": true,
  "include_members": true
}

type_inspect

Inspect a single named type by exact name and retrieve its full declaration, size, kind flags, and optionally its member layout.
queries
TypeInspectQuery | TypeInspectQuery[]
required
Returns TypeInspectResult[]
Inspect a struct with its member layout
{
  "name": "Config",
  "include_members": true
}

Build docs developers (and LLMs) love