roslyn:sync_documents
Synchronize disk file changes with the Roslyn solution to ensure accurate code analysis after editing, creating, or deleting .cs files.
Instructions
Synchronize document changes from disk into the loaded solution. Call this after using Edit/Write tools to ensure Roslyn has fresh content.
USAGE:
sync_documents(filePaths: ["src/Foo.cs", "src/Bar.cs"]) - sync specific files
sync_documents() - sync ALL documents (refresh entire solution)
WHEN TO CALL:
After using Edit tool to modify .cs files
After using Write tool to create new .cs files
After deleting .cs files
NOT needed after using SharpLensMcp refactoring tools (they auto-update)
HANDLES: Modified files (updates content), new files (adds to solution), deleted files (removes from solution). Much faster than load_solution - only updates documents, doesn't re-parse projects.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| filePaths | No | Optional: specific file paths to sync. If omitted, syncs ALL documents from disk. |