Skip to main content
Glama

sharphy_decompile_method

Decompile compiled CIL bytecode into idiomatic C# source to inspect method logic, lambda expressions, or async state machines in a .dll/.exe assembly.

Instructions

Decompiles compiled CIL bytecode into idiomatic C# source code using the embedded ILSpy engine. Use this tool when inspecting method logic, lambda expressions, or async state machines of a compiled assembly. Do NOT use for metadata enumeration (use 'sharphy_inspect_metadata') or binary diffing (use 'sharphy_diff_assemblies'). Read-only inspection.

Input Schema

NameRequiredDescriptionDefault
typeNameYesFully qualified type or class name (including namespace)
methodNameYesName of the target method to decompile
assemblyPathYesAbsolute path to the compiled assembly (.dll/.exe)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.4/5.0
Behavior4/5

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

With no annotations, the description carries the behavioral burden and does disclose that this is read-only inspection and that it uses an embedded ILSpy engine. It does not explain failure modes for obfuscated code, dependency resolution, or potential output limitations, but the key safety profile is stated clearly.

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?

Three compact sentences, front-loaded with the action and engine, followed by usage guidance and exclusions. No sentence is wasted.

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?

The description covers the core operation, intended use cases, exclusions, and read-only nature, which is sufficient for an agent to invoke the tool correctly. It does not address handling of overloaded method names or decompilation failure cases, leaving a minor gap for a tool with three required parameters.

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 the schema already documents assemblyPath, typeName, and methodName. The description adds no parameter-specific detail such as overload disambiguation or path constraints beyond what the schema provides, making the baseline 3 appropriate.

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?

States a specific verb and resource: decompiles CIL bytecode into idiomatic C# source code using ILSpy. It explicitly names sibling tools it is not for (sharphy_inspect_metadata, sharphy_diff_assemblies), so the agent can distinguish it without opening other schemas.

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 when-to-use guidance: inspecting method logic, lambda expressions, or async state machines. It also gives explicit when-not-to-use guidance and names the correct alternatives for metadata enumeration and binary diffing.

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