Skip to main content
Glama

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

TableJSON Schema
NameRequiredDescriptionDefault
filePathsNoOptional: specific file paths to sync. If omitted, syncs ALL documents from disk.
Behavior4/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It effectively explains what the tool handles (modified, new, and deleted files), its performance advantage over 'load_solution', and its role in ensuring Roslyn has fresh content. However, it lacks details on error handling or specific constraints like file path formats, leaving some behavioral aspects unspecified.

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?

The description is well-structured with clear sections (USAGE, WHEN TO CALL, HANDLES) and uses bullet points for readability. Every sentence adds value, such as explaining performance benefits and tool interactions, with no redundant or filler content, making it highly efficient and front-loaded.

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?

Given the tool's complexity (synchronizing document changes) and no annotations or output schema, the description does a strong job covering purpose, usage, and behavior. It addresses key contextual aspects like when to use it and performance comparisons. However, it could improve by detailing error cases or response formats, leaving minor gaps in completeness.

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

Parameters4/5

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

The schema description coverage is 100%, so the baseline is 3. The description adds value by explaining the semantics of the optional 'filePaths' parameter: it provides usage examples (syncing specific files vs. all documents) and clarifies the default behavior when omitted. This enhances understanding beyond the schema's technical specification.

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 the specific action ('Synchronize document changes from disk into the loaded solution') and resource ('documents'). It distinguishes from sibling tools like 'load_solution' by explaining it only updates documents without re-parsing projects, making the purpose explicit and differentiated.

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 provides explicit guidance on when to call this tool (after using Edit/Write tools or deleting .cs files) and when not to (after using SharpLensMcp refactoring tools). It also mentions an alternative ('load_solution') and explains why this tool is preferable in certain scenarios, offering comprehensive usage context.

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/pzalutski-pixel/sharplens-mcp'

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