We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/BeehiveInnovations/pal-mcp-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server
exceptions.py•721 B
"""
Custom exceptions for PAL MCP tools.
These exceptions allow tools to signal protocol-level errors that should be surfaced
to MCP clients using the `isError` flag on `CallToolResult`. Raising one of these
exceptions ensures the low-level server adapter marks the result as an error while
preserving the structured payload we pass through the exception message.
"""
class ToolExecutionError(RuntimeError):
"""Raised to indicate a tool-level failure that must set `isError=True`."""
def __init__(self, payload: str):
"""
Args:
payload: Serialized error payload (typically JSON) to return to the client.
"""
super().__init__(payload)
self.payload = payload