Function

log

Log a message to the client

Servers can send log messages to clients for debugging, monitoring, or informational purposes. The client determines how to display or store these logs.

Log levels:

  • debug: Detailed diagnostic information
  • info: General informational messages
  • notice: Normal but significant events
  • warning: Warning conditions
  • error: Error conditions
  • critical: Critical conditions
  • alert: Action must be taken immediately
  • emergency: System is unusable

https://spec.modelcontextprotocol.io/specification/server/utilities/logging

log: func(output: borrow​<output-stream>, message: string, level: log-level, logger: option​<string>) -> result​<_, notification-error>;