Skip to main content
Glama
models.py1.53 kB
from typing import List, Optional from pydantic import BaseModel, Field # Base classes for API responses, as defined in the detailed design document. class SuccessResponse(BaseModel): """Indicates that the operation completed successfully.""" success: bool = Field(default=True, description="Indicates if the operation was successful.") message: str = Field(default="Operation completed successfully.", description="A confirmation message.") class ErrorDetail(BaseModel): """Provides detailed information about a single error or warning.""" file_path: Optional[str] = Field(None, description="The absolute or relative path to the file.") line: Optional[int] = Field(None, description="The line number of the error.") column: Optional[int] = Field(None, description="The column number of the error.") message: str = Field(..., description="The error or warning message.") severity: str = Field(..., description="The severity of the issue, e.g., 'error' or 'warning'.") class FailureResponse(BaseModel): """Indicates that the operation failed, providing details about the errors and warnings.""" success: bool = Field(default=False, description="Indicates if the operation was successful.") summary: str = Field(..., description="A summary of the errors and warnings.") errors: List[ErrorDetail] = Field(default_factory=list, description="A list of detailed errors.") warnings: List[ErrorDetail] = Field(default_factory=list, description="A list of detailed warnings.")

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/hiono/mcp-cmake'

If you have feedback or need assistance with the MCP directory API, please join our Discord server