Skip to main content
Glama
Kommisaar

dotnet-decompiler-mcp

by Kommisaar

decompile_member

Decompile a single C# member (method, property, field, event, or constructor) from a .NET assembly for targeted code inspection.

Instructions

Decompile a single member (method/field/property/event/ctor) to C#.

Lighter than decompile_type — use this when you only need one method or property from a large type.

Tip: run get_type_summary first to see available member names.

Examples::

# Decompile a method
decompile_member(
    dll="Backend/GameData.dll",
    type_name="GameData.Domains.Character.Character",
    member_name="ChangeHealth",
)

# Decompile a constructor
decompile_member(
    dll="Managed/Assembly-CSharp.dll",
    type_name="Game.Views.Combat.ViewCombat",
    member_name=".ctor",
)

# Decompile a property getter
decompile_member(
    dll="Backend/GameData.dll",
    type_name="GameData.Domains.Combat.CombatCharacter",
    member_name="get_Name",
)

Args: dll (str): Absolute path to the assembly. type_name (str): Fully-qualified owning type name (case-sensitive). member_name (str): Simple member name, e.g. ToString, ChangeHealth, .ctor (constructor), get_Name. asm_paths (list[str] | None): Extra directories for dependency resolution. Almost always None — see decompile_type.

Returns: MemberDecompileResult: The member's C# source plus metadata.

Raises: DllNotFoundError: dll does not exist. TypeNotFoundError: type_name not found. MemberNotFoundError: member_name not found on the type. DecompilationFailedError: Internal decompiler error.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dllYes
type_nameYes
member_nameYes
asm_pathsNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
sourceYes
typeYes
memberYes
Behavior3/5

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

No annotations are provided, so the description carries the full burden. While it lists raised exceptions (DllNotFoundError, etc.), it does not explicitly state the tool is read-only or mention any side effects. The behavior is implied but could be more explicit regarding permissions or effects.

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?

The description is moderately lengthy but well-structured with sections for summary, tip, examples, args, returns, and raises. Each sentence adds value, though some duplication could be trimmed slightly.

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 input schema lacks descriptions, the description covers all necessary aspects: purpose, usage, parameters, return type (via output schema existence), and possible exceptions. It is complete and self-contained for an agent to use correctly.

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?

The input schema has 0% description coverage, but the description compensates with a detailed 'Args' section explaining each parameter (dll, type_name, member_name, asm_paths). Examples illustrate usage, adding substantial 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 it decompiles a single member (method/field/property/event/ctor) to C#. It distinguishes itself from the sibling tool `decompile_type` by being lighter and targeting a single member, which provides specificity.

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?

The description explicitly says to use this tool when only one method or property from a large type is needed, contrasting it with `decompile_type`. It also suggests running `get_type_summary` first to find member names, providing clear context on when to use and alternatives.

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