Skip to main content
The StackNext MCP server is read-only. Every tool is annotated readOnlyHint: true, destructiveHint: false, idempotentHint: true and openWorldHint: false. See MCP server for setup.

Tools

Argument constraints

  • limit is between 1 and 200 (default 50).
  • minDurationMs is between 0 and 600,000.
  • status accepts 2xx, 3xx, 4xx, 5xx or none.
  • sort accepts recent, oldest or slowest.
  • Diagnostic category accepts database, http, performance, errors or runtime.
  • Diagnostic severity accepts info, warning or error.
  • Diagnostic status accepts observed, possible or insufficient-evidence.
  • ruleId accepts n-plus-one-queries, slow-request, slow-span, repeated-external-http, error-fingerprint or server-error-response.
  • since and until are epoch milliseconds.
Regression ids are strict: run-<16 hex>, base-<16 hex> and cmp-<16 hex>. Snapshot ids are strict: snap-<16 hex>. An id that does not match the format is rejected before storage is read. Comparison status is improved, regressed, unchanged or inconclusive; severity is high, medium, low or none.

Response metadata

Every successful response adds a top-level meta object:
  • result.found is the total in the retention window; returned is this page.
  • connection.instrumentation is connected, waiting or unknown.
  • completeness.complete is false for pagination, dropped data, an unconnected app, an empty result or missing parent spans. Read completeness.reasons.
  • Detail responses add meta.identifiers (traceId, errorId, diagnosticId, runId, baselineId, comparisonId, snapshotId and/or candidateId).
  • notes carries short caveats such as omitted stacks, unmeasured query durations, findings that are not confirmed root causes, incomplete regression records, or snapshot data that is not live telemetry.
Successful calls also return structuredContent and advertise an outputSchema when the client supports structured tool output. Tool text content remains pretty-printed JSON for compatibility. The server publishes MCP instructions during initialization. Codex reads these directly; other clients may show or ignore them.

Coverage in the summary

get_project_summary returns the same coverage report as GET /api/coverage and stacknext coverage --json, plus a compact summary in meta.coverage:
coverage.sample gives the retention window and connection state. Each coverage.items[] entry carries a status, evidence count/types, last-seen time and limitations. There is deliberately no percentage or composite score. See instrumentation coverage.

Diagnostics

stacknext_list_diagnostics and stacknext_get_diagnostic expose the same deterministic findings as stacknext diagnose, the dashboard and GET /api/diagnostics. The server does not run a second engine and does not call an AI service. A list response includes total, counts, sample, notes, limitations, engineVersion and ruleSetVersion. Findings are computed over the current in-memory retention window, not all history. total is the number of matching findings; items is the current page. The default finding cap is 100. stacknext_get_diagnostic returns { finding, trace, meta }. The finding contains the rule, category, severity, status, route, time window, affected trace count, fingerprint, bounded evidence, verification steps and limitations. The related trace is bounded; use get_trace for the complete span tree when it is truncated. get_trace adds a diagnostics array of references (id, ruleId, category, severity, status, title) without changing the trace shape. Call stacknext_get_diagnostic for evidence. Findings are evidence, not confirmed root causes, and ids can disappear when telemetry ages out.

Regression and snapshot semantics

Regression tools expose the same records as stacknext runs, stacknext baseline and stacknext compare. They cannot capture, save, compare, remove or edit a record.
  • A sample is verified only when the collector found the injected trace and a server span parented to the injected span id. Incomplete reasons include trace-not-found, injected-parent-not-found and no-request-trace-recorded.
  • Run status is running, completed, failed, interrupted or incomplete.
  • Comparison detail includes environment.compatible, differences, per-scenario status/severity/reasons/metrics, warnings and limitations.
  • Snapshot tools read frozen copies and never replay them. A snapshot carries no live diagnostics or coverage.
See regression testing and snapshots.

Prompts

The server offers five optional prompts. They shape an investigation but do not add capabilities or execute tools on their own.