MCPcopy
hub / github.com/modelcontextprotocol/python-sdk / error

Method error

src/mcp/server/mcpserver/context.py:306–308  ·  view source on GitHub ↗

Send an error log message.

(self, data: Any, *, logger_name: str | None = None)

Source from the content-addressed store, hash-verified

304
305 @deprecated("The logging capability is deprecated as of 2026-07-28 (SEP-2577).", category=MCPDeprecationWarning)
306 async def error(self, data: Any, *, logger_name: str | None = None) -> None:
307 """Send an error log message."""
308 await self.log("error", data, logger_name=logger_name) # pyright: ignore[reportDeprecated]

Callers 15

message_handlerFunction · 0.80
sse_readerFunction · 0.80
_handle_post_requestMethod · 0.80
get_uv_pathFunction · 0.80
_parse_env_varFunction · 0.80
_parse_file_pathFunction · 0.80
_import_serverFunction · 0.80
_check_server_objectFunction · 0.80
devFunction · 0.80
installFunction · 0.80
connect_sseMethod · 0.80

Calls 1

logMethod · 0.95

Tested by 3

logging_toolMethod · 0.64
narrateFunction · 0.64
chatterFunction · 0.64