Logging
Servers emit notifications/message with a syslog-style LoggingLevel (RFC 5424). Clients filter via logging/setLevel.
| Level | When to use |
|---|---|
| debug | Verbose diagnostic output. |
| info | Routine progress. |
| notice | Normal but significant. |
| warning | Something unusual but recoverable. |
| error | Failure that didn't stop the server. |
| critical / alert / emergency | Escalating severity. |
{
"jsonrpc": "2.0",
"method": "notifications/message",
"params": { "level": "warning", "logger": "auth", "data": "Rate limit close" }
}
Progress
To opt into progress updates, the requester puts a progressToken in params._meta. The receiver then emits notifications/progress carrying the same token.
{
"method": "tools/call",
"params": {
"_meta": { "progressToken": "abc123" },
"name": "long_operation",
"arguments": {}
}
}
{
"method": "notifications/progress",
"params": { "progressToken": "abc123", "progress": 50, "total": 100, "message": "Indexing..." }
}
progressMUST increase monotonically.totalis optional — omit if unknown.- Each in-flight request needs its own unique token.
Cancellation
Best-effort cancellation: either side sends notifications/cancelled with the request id. Receivers MAY stop work; cancellation is not guaranteed.
{
"method": "notifications/cancelled",
"params": { "requestId": 7, "reason": "User pressed Stop" }
}
Argument completion
Clients call completion/complete as the user types arguments for a prompt or resource template. Servers return up to 100 suggestions plus optional total and hasMore.
The _meta field
Reserved on most objects for custom metadata. Use reverse DNS keys (com.example/feature). Prefixes starting with io.modelcontextprotocol/ or mcp/ are reserved. The OpenTelemetry trace keys (traceparent, tracestate, baggage) are special — no prefix required.
Quick summary
- Logging uses syslog levels — respect logging/setLevel
- Progress tokens opt in to incremental updates
- Cancellation is best-effort, not guaranteed
- Argument completion improves UX with up to 100 suggestions
- Use reverse DNS keys for custom
_meta