We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/jaewilson07/comfy_mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server
response.py•990 B
"""Response data structures for HTTP client."""
from dataclasses import dataclass
from typing import Any
@dataclass
class ResponseGetData:
"""Standardized response object for HTTP requests.
This provides a consistent interface for handling HTTP responses across
all route functions, following the Single Responsibility Principle.
Attributes:
status: HTTP status code
response: Parsed response body (usually dict or list from JSON)
is_success: Whether the request was successful (2xx status)
headers: Optional response headers
url: Optional request URL for debugging
"""
status: int
response: Any
is_success: bool
headers: dict | None = None
url: str | None = None
def __repr__(self) -> str:
status_emoji = "✓" if self.is_success else "✗"
return (
f"ResponseGetData({status_emoji} status={self.status}, "
f"has_data={self.response is not None})"
)