trace_build
[solution]
Builds a .NET project or solution and stores diagnostics with a sensitive MSBuild binary log.
Before you use this tool
Executes commands with your local permissions. Commands can change workspace files and contact package sources. Check the workspace and runner policy. Runs a workspace-scoped build. Binlogs may contain command lines, environment variables, and property values; the msbuild runner requires --allow-executable msbuild.
Try it locally in the GliderTrace playground
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| targetPath | string | No | Optional solution, project, or directory path under the workspace root. Defaults to the workspace root. |
| configuration | string | No | Build configuration. Defaults to Release. |
| framework | string | No | Target framework moniker passed as --framework. Requires runner 'dotnet'; use properties with runner 'msbuild'. |
| noRestore | boolean | No | Skip restore (--no-restore for dotnet build; omits -restore for msbuild). Defaults to false. Default: false |
| runner | string | No | Build runner: 'auto' (default, dotnet build) or 'msbuild' (Visual Studio MSBuild.exe located through vswhere; requires the server started with --allow-executable msbuild). |
| properties | json | No | MSBuild properties passed as -p:Key=Value, for example EnableSourceControlManagerQueries=false for git worktrees. |
| arguments | json | No | Additional MSBuild arguments appended verbatim, for example /nr:False or /m. Binary-logger arguments are managed by the tool and rejected. |
| environment | json | No | Optional environment variables to set for the build process. |
| timeoutMs | number | No | Optional build timeout in milliseconds. When exceeded the session completes with status timeout. |
| summaryLimit | number | No | Maximum diagnostics returned in topFindings, errors first. Clamped to 1..100. Defaults to 20. Default: 20 |
| label | string | No | Optional short label for the stored session, for example nightly-baseline. Use it to find the session again with trace_list_sessions. Maximum 128 characters. |
| profile | string | No | Optional named MSBuild property profile. Use 'worktree' to accommodate a Git worktree checkout. Its properties merge under any properties you pass. |
Examples
Replace sample paths and symbol keys with values from your workspace.
Build the workspace and capture binlog evidence
{}Full MCP request
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "trace_build",
"arguments": {}
}
}Build a legacy solution with Visual Studio MSBuild
{
"runner": "msbuild",
"properties": {
"EnableSourceControlManagerQueries": "false"
}
}Full MCP request
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "trace_build",
"arguments": {
"runner": "msbuild",
"properties": {
"EnableSourceControlManagerQueries": "false"
}
}
}
}Response Notes
Returns a build session id, status, exit code, errorCount/warningCount/projectCount/buildSucceeded summary, errors-first topFindings, and a sensitive binlog artifact reference.
GliderTrace 1.0.0 returns compact JSON for every tool. Result fields appear beside success; there is no response-format parameter. success describes the tool call. Check the process or session status and exitCode separately. Scalar results and fields that conflict with reserved names appear under result.
To migrate an envelope consumer, read response.sessionId instead of response.data.sessionId. Stored sessions and exported files keep their formats. --max-response-chars limits response text to 60,000 UTF-16 characters by default. Use 0 to disable it, or at least 1,000. This limit counts text characters, not transport bytes or tokens.
outputLimit.truncated marks omitted response detail. It does not change capture completeness. Use the returned next tool and arguments when available. Do not repeat a command or feedback submission to recover omitted output. For event pages, keep the filters and cursor while reducing limit.
For session details, set includeArtifacts and includeTopFindings to false to reduce output. Check error, actionable meta, warnings, and coverage before drawing conclusions. Internal diagnostics stay in local server logs.