0Pricing
MCP Academy · Lesson

Set Log Levels at Runtime

Let clients turn verbosity up or down.

Verbosity on Demand

Sometimes a user wants quiet logs, sometimes deep detail. MCP lets the client set a log level at runtime instead of restarting the server.

The setLevel Request

The client sends a logging/setLevel request naming the lowest level it wants. This is a request, so the server replies to confirm.

{"method": "logging/setLevel",
 "params": {"level": "warning"}}

All lessons in this course

  1. Send Progress for Long Tasks
  2. Handle Cancellation Requests
  3. Structured Logging to the Client
  4. Set Log Levels at Runtime
← Back to MCP Academy