trace_query_log
[analysis]
Reads redacted retained raw log context, including INFO recovery, retries, and correlations omitted from normalized events. Use a returned source ID or registered log artifact URI. Follow nextStartLine.
From GliderTrace 2.0.1.
Try it locally in the GliderTrace playground
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| sessionId | string | Yes | Trace session id, for example trc_20260507_123044_ab12cd34. |
| sourceId | string | Yes | Source ID from a text event, or an exact registered log, stdout, or stderr artifact URI in this session. |
| text | string | No | Optional case-insensitive text filter after redaction. Maximum 512 characters. |
| startLine | number | No | One-based source line. Use nextStartLine to continue with the same source and text filter. Default: 1 |
| limitLines | number | No | Maximum matching lines, 1..100. A separate 12000-character text budget also bounds the response. Default: 50 |
Examples
Replace sample paths and symbol keys with values from your workspace.
Find outcome context in a retained source
{
"sessionId": "trc_20260507_123044_ab12cd34",
"sourceId": "Copy source.sourceId from a text event",
"text": "request-42"
}Full MCP request
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "trace_query_log",
"arguments": {
"sessionId": "trc_20260507_123044_ab12cd34",
"sourceId": "Copy source.sourceId from a text event",
"text": "request-42"
}
}
}Response Notes
Returns evidenceKind rawSourceText, absolute source line numbers, redacted text, and nextStartLine. This is raw-source evidence, not normalized events. Follow nextStartLine with the same source and filter. scannedThroughLine can include a lookahead match beyond the returned page; nextStartLine retains that match. Read searchComplete, sourceTruncated, and warnings separately from ingestCoverage.
Search scans at most 64 MiB. Lines over 16384 characters and incomplete lines at the byte cap are omitted before search and projection. Unfiltered pages retain an omission placeholder. Invalid UTF-8 uses replacement characters. These gaps make search incomplete; an empty page does not establish absence. Response limits can also omit text.
Only registered retained log sources are available. An arbitrary filesystem path is not a sourceId. If raw text was not retained, use the original source through another authorized reader. Redaction does not establish that returned text is safe to publish.
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.