Skip to main content
Glama

get_viewed_episodes

Retrieve watched episodes for a TV show using its ID to track viewing progress and manage watch history.

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
NameRequiredDescriptionDefault
myshows_item_idYes

Implementation Reference

  • The MCP tool handler for 'get_viewed_episodes', decorated with @mcp.tool() for registration and @tool_handler for common error handling. It delegates the logic to the MyShowsAPI client.
    @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)
  • Supporting API client method that makes the JSON-RPC call to 'profile.Episodes' to fetch viewed episodes for the given show ID.
    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 )

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/zeloras/myshows_mcp'

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