load
[solution]
Loads a C# solution or project. File watches are enabled by default.
Try it locally in the Glider playground
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| filePath | string | Yes | Absolute path to .sln, .slnx, or .csproj file to load. |
| workingDirectory | string | No | Working directory to watch for file changes. Defaults to the enclosing git repository root of the loaded file (or its directory outside a repository). Enables automatic sync of changed files. |
| includeProjects | boolean | No | Include detailed project information in response. Default is false. Default: false |
| noWatch | boolean | No | Disable file watching for this load. Cannot be combined with workingDirectory. Default is false. Default: false |
| responseDetail | string | No | compact returns results and actionable state. full adds diagnostic metadata under responseDiagnostics. Default: "compact" |
Examples
Replace sample paths and symbol keys with values from your workspace.
Load a solution (watches the repository root)
{
"filePath": "/Users/dev/MyProject/MyProject.sln"
}Full MCP request
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "load",
"arguments": {
"filePath": "/Users/dev/MyProject/MyProject.sln"
}
}
}{
"success": true,
"loadedPath": "/Users/dev/MyProject/MyProject.sln",
"loadedKind": "solution",
"projectCount": 2,
"projects": [
{
"name": "MyProject",
"filePath": "/Users/dev/MyProject/MyProject.csproj",
"documentCount": 42
}
],
"fileWatcher": {
"enabled": true,
"watchedDirectory": "/Users/dev/MyProject"
},
"cache": {
"cacheStatus": "valid",
"revision": 1,
"lastRefreshUtc": "2026-01-23T21:06:33.123Z",
"loadedKind": "solution",
"loadedPath": "/Users/dev/MyProject/MyProject.sln"
}
}Load with a custom watch root
{
"filePath": "/Users/dev/MyProject/MyProject.sln",
"workingDirectory": "/Users/dev/MyProject",
"includeProjects": true
}Full MCP request
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "load",
"arguments": {
"filePath": "/Users/dev/MyProject/MyProject.sln",
"workingDirectory": "/Users/dev/MyProject",
"includeProjects": true
}
}
}Load without file watching
{
"filePath": "/Users/dev/MyProject/MyProject.csproj",
"noWatch": true
}Full MCP request
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "load",
"arguments": {
"filePath": "/Users/dev/MyProject/MyProject.csproj",
"noWatch": true
}
}
}Response Notes
File watching is enabled by default at the enclosing git repository root; set workingDirectory to watch a different root, or noWatch to disable watching. Calling load for a path that is already loading waits for the in-flight load and reuses it. A load that fails because a project file declares an encoding the build host cannot read names that encoding in the error. Save that file as UTF-8 to clear it.
Returns the loaded path, project list, watcher state, and cache metadata. Results use top-level fields with success. Compact is the default; full adds responseDiagnostics. Both modes retain errors, coverage, partial state, and recovery advice.