fastmcp.server.context
set_context
LogData
Context
request_context
report_progress
progress
: Current progress value e.g. 24total
: Optional total value e.g. 100read_resource
uri
: Resource URI to readlog
message
: Log messagelevel
: Optional log level. One of “debug”, “info”, “notice”, “warning”, “error”, “critical”,
“alert”, or “emergency”. Default is “info”.logger_name
: Optional logger nameextra
: Optional mapping for additional argumentsclient_id
request_id
session_id
session
debug
info
warning
error
list_roots
send_tool_list_changed
send_resource_list_changed
send_prompt_list_changed
sample
elicit
elicit
elicit
elicit
message
: A human-readable message explaining what information is neededresponse_type
: The type of the response, which should be a primitive
type or dataclass or BaseModel. If it is a primitive type, an
object schema with a single “value” field will be generated.get_http_request
set_state
get_state