Skip to main content
Glama

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

Implementation Reference

  • 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 )
  • The @mcp.tool() decorator registers the get_viewed_episodes function as an MCP tool.
    @mcp.tool()
  • Function signature and docstring define the input schema (myshows_item_id: int) and output (dict).
    async def get_viewed_episodes(myshows_item_id: int):

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