Skip to main content
Production retrieval must be debuggable and measurable. RCP exposes two optional channels; both are advisory and never alter retrieval semantics.

Log notifications

A server that advertises log MAY emit notifications/log at any time — no id, no response:
string
Syslog-style severity: debug, info, notice, warning, error.
string
Human-readable text. Never parse it for control flow.
string
Optional component/source name.
object
Optional structured payload — timings, counts, ids.
A client MAY advertise a minimum level via initialize.params._meta.logLevel; servers SHOULD honour it and emit logs only when the client advertised the log capability. A client MUST function correctly if it drops every log.
Over stdio, logs travel as notifications/log on stdoutnot stderr — so a supervising client sees them in-band and correlated with requests. stderr remains for unstructured, human-only diagnostics.

Usage telemetry

Every retrieve / rerank / graph result SHOULD carry a usage object with per-request telemetry:
integer
Candidates produced by the recall stage — attribute recall vs precision.
integer
How many candidates the reranker actually rescored.
integer
Server-side wall time for the request.
string[]
Free-form notes — e.g. a graceful strict:false degradation.
Trace-correlation ids belong in _meta (e.g. _meta.traceId), never in a core field. Combine usage.candidates/usage.reranked with the funnel invariant to tune candidateK/topN/k, and pair it with fixed seed + pinned indexVersion for reproducible evals — see Evaluation.