Skip to main content
Glama

Read Unity IL2CPP metadata

re_il2cpp
Read-onlyIdempotent

Reads Unity IL2CPP global-metadata.dat files to list assemblies, types, methods, MonoBehaviours, and string literals, then writes C# skeletons for rebuilding or porting game assemblies.

Instructions

Reads a Unity IL2CPP global-metadata.dat (metadata versions 24–31; sections are recognised by validating their records, not by fixed offsets): assemblies with type counts, every type with namespace and method names, MonoBehaviours (types with Unity callbacks) and string literals. Writes one C# skeleton per game assembly (namespaces, classes, method names as comments) to rebuild or port from. Method bodies are native code in GameAssembly.dll / libil2cpp.so / the .wasm (re_binary). Encrypted or obfuscated metadata is reported, never decrypted.

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": {
      "file": "<file>"
    },
    "name": "re_il2cpp"
  }
}

Input Schema

NameRequiredDescriptionDefault
outNoFolder for the C# skeletons (default workspace/il2cpp/<game>).
fileYesglobal-metadata.dat (<Game>_Data/il2cpp_data/Metadata/ or Il2CppData/Metadata in WebGL builds).
limitNoMax types listed (default 400).
matchNoOnly types whose name or methods contain this.
includeSystemNoAlso list Unity/System/mscorlib types (default false).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.25.0

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already cover readOnly/idempotent/non-destructive, yet the description adds real behavioral context: it writes one C# skeleton per assembly to an output folder, reports encrypted/obfuscated metadata instead of attempting decryption, and identifies metadata records by validation rather than fixed offsets. The file-writing side effect is a mild tension with readOnlyHint=true, but it is disclosed rather than hidden, so it reads as explicit artifact output rather than a contradiction.

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?

Information-dense and front-loaded: capability, output artifacts, then the native-code boundary and safety caveat. Parentheticals carry useful trust signals (version range, record-validation) but the single-block paragraph is heavy and could be split for scanability.

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

Completeness5/5

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

For a 5-param reader with no output schema, the description covers what is produced (C# skeletons per assembly), what is enumerated, and what is explicitly out of scope (native method bodies, decryption). Nothing an agent needs in order to call this correctly is missing.

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 description coverage is 100%, so out, file, limit, match, and includeSystem are already documented in the input schema. The description adds conceptual context (where metadata files live, that skeletons go per assembly) but no per-parameter semantics beyond what the schema states, matching the baseline 3.

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?

Specific verb plus resource (reads a Unity IL2CPP global-metadata.dat) with enumerated outputs (assemblies, types with namespace/method names, MonoBehaviours, string literals) and supported versions 24-31. It also distinguishes itself from its sibling by noting method bodies live in native code reachable via re_binary, so an agent can tell these apart without opening schemas.

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?

Implies the usage context clearly: analyze Unity IL2CPP builds that ship a global-metadata.dat, and route to re_binary for method bodies or the native module. It does not spell out when NOT to use it (e.g. Mono/IL2CPP-with-symbols artifacts, or protected metadata beyond reporting), so it stops short of explicit exclusions.

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