Skip to content

exceptions

Common exceptions for MADA MCP servers.

BackendConnectionError

Bases: MCPServerError

Exception raised when backend connection fails.

Source code in src/mada_tools/shared/exceptions.py
class BackendConnectionError(MCPServerError):
    """Exception raised when backend connection fails."""

    pass

ConfigurationError

Bases: MCPServerError

Exception raised when configuration is invalid.

Source code in src/mada_tools/shared/exceptions.py
class ConfigurationError(MCPServerError):
    """Exception raised when configuration is invalid."""

    pass

MCPServerError

Bases: Exception

Base exception for MCP server errors.

Source code in src/mada_tools/shared/exceptions.py
class MCPServerError(Exception):
    """Base exception for MCP server errors."""

    pass

PortInUseError

Bases: MCPServerError

Exception raised when a port is already in use.

Source code in src/mada_tools/shared/exceptions.py
class PortInUseError(MCPServerError):
    """Exception raised when a port is already in use."""

    pass

TemplateContextError

Bases: ValueError

Raised when jinja template context construction fails.

Source code in src/mada_tools/shared/exceptions.py
class TemplateContextError(ValueError):
    """Raised when jinja template context construction fails."""

ToolExecutionError

Bases: MCPServerError

Exception raised when a tool execution fails.

Source code in src/mada_tools/shared/exceptions.py
class ToolExecutionError(MCPServerError):
    """Exception raised when a tool execution fails."""

    pass