Skip to main content
Glama
responses.py1.83 kB
"""Pydantic response models for MCP tool responses.""" from pydantic import BaseModel, Field class ErrorResponse(BaseModel): """Error response model.""" error: str = Field(..., description="Error message") class ComponentResponse(BaseModel): """Base response model for all component additions.""" component: str = Field(..., description="Component type added") start_time: float = Field(..., description="Start time in seconds") duration: float = Field(..., description="Duration in seconds") class ChartComponentResponse(ComponentResponse): """Response model for chart components.""" data_points: int = Field(..., description="Number of data points") title: str | None = Field(None, description="Chart title") class CodeComponentResponse(ComponentResponse): """Response model for code components.""" language: str = Field(..., description="Programming language") lines: int = Field(..., description="Number of lines of code") class CounterComponentResponse(ComponentResponse): """Response model for counter component.""" start_value: float = Field(..., description="Starting value") end_value: float = Field(..., description="Ending value") class LayoutComponentResponse(ComponentResponse): """Response model for layout components.""" layout: str = Field(..., description="Layout type or configuration") class OverlayComponentResponse(ComponentResponse): """Response model for overlay components.""" # Flexible model for various overlay props pass class FrameComponentResponse(ComponentResponse): """Response model for frame components (DeviceFrame, BrowserFrame, Terminal, etc.).""" position: str = Field(..., description="Position on screen") theme: str | None = Field(None, description="Theme or device type")

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/chrishayuk/chuk-mcp-remotion'

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