get_viewed_episodes
Retrieve watched episodes for a TV show using its MyShows ID to track viewing progress and manage your watchlist.
Instructions
Retrieves the viewed episodes of a TV show by its ID. :param myshows_item_id: The ID of the TV show to retrieve episodes for. :return: A dictionary containing the episodes of the TV show.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| myshows_item_id | Yes |
Implementation Reference
- src/myshows_mcp/server.py:63-70 (handler)Handler function for the 'get_viewed_episodes' tool, decorated with @mcp.tool() for registration and @tool_handler for error handling. Delegates to api_client.get_viewed_tv_episodes.@mcp.tool() @tool_handler async def get_viewed_episodes(myshows_item_id: int): """Retrieves the viewed episodes of a TV show by its ID. :param myshows_item_id: The ID of the TV show to retrieve episodes for. :return: A dictionary containing the episodes of the TV show. """ return await api_client.get_viewed_tv_episodes(myshows_item_id=myshows_item_id)
- API helper method that makes the actual JSON-RPC call to 'profile.Episodes' for retrieving viewed episodes of a TV show.async def get_viewed_tv_episodes(self, myshows_item_id: int): """Get viewed tv show's episodes :param myshows_item_id: The ID of the TV show to retrieve episodes for. :return: A dictionary containing the episodes of the TV show. """ return await self._make_request( "profile.Episodes", params={"showId": int(myshows_item_id)}, id=96 )
- src/myshows_mcp/server.py:63-63 (registration)The @mcp.tool() decorator registers the get_viewed_episodes function as an MCP tool.@mcp.tool()
- src/myshows_mcp/server.py:65-65 (schema)Function signature and docstring define the input schema (myshows_item_id: int) and output (dict).async def get_viewed_episodes(myshows_item_id: int):