agentleFS
VuDZVuDZ/RoslynMcpServer/.cursor/rules/roslyn-mcp-tools.mdc

RoslynMcpServer / rules

Cursor rule8 starsChanged 45 days agoMITView on GitHub

MCP tool mapping — skeleton vs decompile vs symbols vs build

The file

Files
roslyn-mcp-tools.mdc
---
description: MCP tool mapping — skeleton vs decompile vs symbols vs build
alwaysApply: true
---

# Tool mapping (avoid mixups)

| Intent | Tool | Key args |
|--------|------|----------|
| File/folder skeleton (disk) | `get_code_skeleton` | **`path`** only (`.cs` or dir; max 20 files; skips bin/obj/Test) |
| Type skeleton in loaded workspace | `get_class_skeleton` | symbol / workspace context |
| External/NuGet type body | `decompile_type` | `assemblyName` **or** `assemblyPath` + `fullTypeName` |
| External signatures only | `get_decompiled_class_skeleton` | same assembly args |
| Method in decompiled type | `get_decompiled_method_body` | assembly + type + method |
| Explore DLL | `explore_assembly` | `assemblyName` or `assemblyPath` |
| Symbol find | `find_symbol_definition` / `find_usages` / `find_symbol_references` | prefer `find_usages` when only name known |
| Project folder rename | `rename_project` | SDK-style; `dryRun` first; no namespace chain |
| Interfaces/base | `find_implementations` | not `find_usages` |
| Plain text in `.cs` | `search_code` or host Grep | leftover branding → `caseSensitive=true` |
| Build / test / run | `run_dotnet_build` / `run_dotnet_test` / `run_specific_test` / `run_dotnet_run` | never shell `dotnet` for these; build: default `noIncremental`, optional `configuration`; tests: `timeoutSeconds` (build+test budget), optional `noBuild`/`noRestore` |
| NuGet vulns | `run_nuget_audit` | separate from compile errors |
| Git status for agents | `get_changed_files` | porcelain + suggested tests; **no** full diff |

## Failure UX

Missing `path` on `get_code_skeleton` → friendly text error (do not throw unhandled MCP exception). Do not accept `assemblyName`/`typeName` on file skeleton tools.

## Hybrid search (AGENTS)

- Shell grep/`Select-String` forbidden for agent workflow.
- C# symbols → MCP after `load_workspace`.
- Strings/comments/non-C# → host Grep/SemanticSearch OK.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.