check_episode
Mark TV show episodes as watched by providing episode IDs, supporting both individual episodes and batch operations for efficient viewing management.
Instructions
Marks a specific episode as watched by its ID. Supports both single episode ID and list of episode IDs for batch operations.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| episode_id | Yes |
Implementation Reference
- src/myshows_mcp/server.py:73-78 (handler)MCP tool handler for 'check_episode', registered with @mcp.tool() decorator and wrapped with tool_handler for error handling. This is the primary entry point for the tool, which delegates to the API client.@mcp.tool() @tool_handler async def check_episode(episode_id: Union[int, List[int]]): """Marks a specific episode as watched by its ID. Supports both single episode ID and list of episode IDs for batch operations.""" return await api_client.check_episode(episode_id=episode_id)
- Supporting function in MyShowsAPI class that handles parameter formatting for single or batch episode IDs and invokes the 'manage.CheckEpisode' RPC endpoint via _make_request.async def check_episode(self, episode_id: Union[int, List[int]]) -> Dict[str, Any]: """Marks an episode as watched by its ID. :param episode_id: The ID of the episode to check, or a list of episode IDs for batch operation. :return: A dictionary containing the result of the check operation. """ if isinstance(episode_id, list): params = [{"id": int(ep_id)} for ep_id in episode_id] else: params = {"id": int(episode_id)} return await self._make_request( "manage.CheckEpisode", params=params, id=113 )