Skip to main content
Glama
base.py2.18 kB
"""Base watchlist models for the Trakt MCP server.""" from datetime import datetime from typing import Literal from pydantic import BaseModel, Field from models.movies.movie import TraktMovie from models.shows.episode import TraktEpisode from models.shows.show import TraktShow class TraktSeason(BaseModel): """Represents a Trakt season for watchlist.""" number: int = Field(ge=0) # Season 0 is typically specials ids: dict[str, str | int | None] | None = None class TraktSyncEpisodeWatchlist(BaseModel): """Episode watchlist item for nested watchlist within seasons.""" number: int = Field(ge=1) # Episode numbers start at 1 notes: str | None = Field( default=None, max_length=500, description="User notes (VIP only)" ) class TraktSyncSeasonWatchlist(BaseModel): """Season watchlist item for nested watchlist within shows.""" number: int = Field(ge=0) # Season 0 is typically specials notes: str | None = Field( default=None, max_length=500, description="User notes (VIP only)" ) episodes: list[TraktSyncEpisodeWatchlist] | None = None class TraktSyncWatchlistItem(BaseModel): """Watchlist item for POST/DELETE requests.""" title: str | None = None year: int | None = Field(default=None, gt=1800) # Reasonable year constraint ids: dict[str, str | int | None] | None = None notes: str | None = Field( default=None, max_length=500, description="User notes (VIP only)" ) # For episodes within shows seasons: list[TraktSyncSeasonWatchlist] | None = None class TraktWatchlistItem(BaseModel): """Individual watchlist item from sync API.""" rank: int = Field(ge=1, description="Position in watchlist") id: int = Field(ge=1, description="Watchlist item ID") listed_at: datetime = Field(description="Timestamp when added (UTC)") notes: str | None = Field( default=None, max_length=500, description="User notes (VIP only)" ) type: Literal["movie", "show", "season", "episode"] movie: TraktMovie | None = None show: TraktShow | None = None season: TraktSeason | None = None episode: TraktEpisode | None = None

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/wwiens/trakt_mcpserver'

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