Skip to main content
Glama
Kommisaar

dotnet-decompiler-mcp

by Kommisaar

decompile_type

Decompile any .NET type from a DLL or EXE to readable C# source code, automatically resolving dependencies without manual path configuration.

Instructions

Decompile a whole .NET type to C# source (with comments).

The decompiler automatically resolves dependencies from the target DLL's own directory and the bundled lib/ folder, so asm_paths is almost never needed for typical Unity/Godot games.

Tip: use list_types first to discover available types, then pass the exact namespace.TypeName here.

Examples::

# Decompile an entire class
decompile_type(
    dll="Backend/GameData.dll",
    type_name="GameData.Domains.Character.Character",
)

# Decompile an enum
decompile_type(
    dll="Backend/GameData.dll",
    type_name="GameData.Domains.Combat.CombatCharacterStateType",
)

Args: dll (str): Absolute path to the assembly (.dll or .exe). type_name (str): Fully-qualified type name, case-sensitive, e.g. GameData.Domains.Taiwu.TaiwuDomain. asm_paths (list[str] | None): Extra directories for dependency resolution. The DLL's own folder and the bundled lib/ are searched automatically, so this can almost always be None. Only needed when a referenced assembly lives outside those paths.

Returns: DecompileResult: The decompiled C# source plus type/dll metadata.

Raises: DllNotFoundError: dll does not exist or is not readable. TypeNotFoundError: type_name was not found (check spelling/case). DecompilationFailedError: Decompiler encountered an internal error.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dllYes
type_nameYes
asm_pathsNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
sourceYes
typeYes
dllYes
Behavior5/5

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

No annotations provided, so the description carries full burden. It discloses automatic dependency resolution, specific error types raised, and that output includes decompiled source plus metadata. No contradictions.

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?

Well-structured with a clear summary, tips, examples, and parameter descriptions. Slightly verbose due to examples and detailed parameter text, but the organization makes it easy to parse. Could be trimmed slightly without losing value.

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?

Given the complexity (3 params, output schema exists, sibling tools), the description is very complete. It covers usage, behavior, parameter semantics, error handling, and return values (via output schema). No gaps.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so description compensates thoroughly. It explains each parameter: 'dll' (absolute path), 'type_name' (fully-qualified, case-sensitive, with examples), and 'asm_paths' (optional, default None, when needed). Adds significant meaning 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 clearly states 'Decompile a whole .NET type to C# source (with comments),' specifying the verb (decompile), resource (.NET type), and output (C# source). It distinguishes from sibling tools like 'decompile_member' and 'list_types' by focusing on whole type decompilation.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Provides explicit guidance: use 'list_types' first to discover types, pass exact 'namespace.TypeName', and notes that 'asm_paths' is almost never needed due to automatic dependency resolution. This helps the agent choose when and how to use the tool.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Kommisaar/dotnet-decompiler-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server