Browse documentation

trace_run

[solution]

Runs a command under the workspace, captures stdout/stderr evidence, and stores a GliderTrace runtime session.

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 local command. Review command and arguments before executing from the playground.

Try it locally in the GliderTrace playground

Parameters

NameTypeRequiredDescription
commandstringYesCommand executable to run.
argumentsjsonNoOptional command arguments.
workingDirectorystringNoOptional working directory under the workspace root. Defaults to the workspace root.
environmentjsonNoOptional environment variables to set for the command process.
captureStdoutbooleanNoCapture stdout as a sensitive artifact. Defaults to true. Default: true
captureStderrbooleanNoCapture stderr as a sensitive artifact. Defaults to true. Default: true
collectTracebooleanNoCollect a runtime.nettrace artifact with built-in EventPipe collection. Mutually exclusive with collectCounters. Default: false
collectCountersbooleanNoCollect a counters.csv artifact with dotnet-counters. Mutually exclusive with collectTrace. Default: false
labelstringNoOptional short label for the stored session, for example nightly-baseline. Use it to find the session again with trace_list_sessions. Maximum 128 characters.

Examples

Replace sample paths and symbol keys with values from your workspace.

Run dotnet test and store command evidence

Arguments
{
  "command": "dotnet",
  "arguments": [
    "test",
    "MyApp.sln"
  ]
}
Full MCP request
Full MCP request
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "trace_run",
    "arguments": {
      "command": "dotnet",
      "arguments": [
        "test",
        "MyApp.sln"
      ]
    }
  }
}

Response Notes

Returns a stored session id, command status, exit code, artifact references, findings, and timeout metadata.

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.