python-sdk/src/mcp/server/mcpserver/exceptions.py
2026-01-25 14:45:52 +01:00

21 lines
449 B
Python

"""Custom exceptions for MCPServer."""
class MCPServerError(Exception):
"""Base error for MCPServer."""
class ValidationError(MCPServerError):
"""Error in validating parameters or return values."""
class ResourceError(MCPServerError):
"""Error in resource operations."""
class ToolError(MCPServerError):
"""Error in tool operations."""
class InvalidSignature(Exception):
"""Invalid signature for use with MCPServer."""