check_episode
Mark TV show episodes as watched using episode IDs, supporting both single and batch operations to track viewing progress.
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)The MCP tool handler and registration for 'check_episode'. It uses @mcp.tool() decorator for FastMCP registration, @tool_handler for common logic, defines input schema via type hints and docstring, and delegates execution to the MyShowsAPI 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)
- The core implementation helper in MyShowsAPI that handles single or batch episode check by formatting RPC parameters and invoking the '_make_request' method for the 'manage.CheckEpisode' JSON-RPC call.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 )