[solution]
Synchronizes one or more documents from disk into the in-memory workspace (faster than reload_current for .cs edits).
Try this tool in Playground.
| Name | Type | Required | Description |
|---|---|---|---|
| filePaths | json | No | Optional file paths to sync. JSON array of strings. If omitted/empty, syncs all documents in the loaded solution/project. |
| pathStyle | string | No | Path style: 'absolute' (default) or 'relative' (to solution root). |
| timeout_ms | number | No | Timeout in milliseconds. Use 0 to disable. Default is 60000. |
Sync all documents
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "sync_documents",
"arguments": {}
}
}{
"success": true,
"data": {
"updated": [
"/Users/dev/MyProject/Program.cs"
],
"skipped": [],
"totalSynced": 1,
"revisionBefore": 3,
"revisionAfter": 4,
"fallbackToReload": false,
"fallbackReason": null
},
"error": null
}Sync a specific file
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "sync_documents",
"arguments": {
"filePaths": "[\"/Users/dev/MyProject/Program.cs\"]"
}
}
}{
"success": true,
"data": {
"updated": [
"/Users/dev/MyProject/Program.cs"
],
"skipped": [],
"totalSynced": 1,
"revisionBefore": 3,
"revisionAfter": 4,
"fallbackToReload": false,
"fallbackReason": null
},
"error": null
}Returns updated and skipped files plus revision info