get_episode
Retrieve detailed information about specific podcast episodes from Jupiter Broadcasting shows by providing the show name and episode number.
Instructions
Get detailed information about a specific episode.
Args: show_name: Name of the show episode_number: Episode number
Returns: Episode data including title, description, hosts, enclosures, etc.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| show_name | Yes | ||
| episode_number | Yes |
Implementation Reference
- podcast_mcp/server.py:88-107 (handler)The primary MCP tool handler for 'get_episode', decorated with @mcp.tool(). It handles input validation via type hints and docstring, calls the RSS parser helper, and formats the response or error.@mcp.tool() def get_episode(show_name: str, episode_number: str) -> Dict[str, Any]: """Get detailed information about a specific episode. Args: show_name: Name of the show episode_number: Episode number Returns: Episode data including title, description, hosts, enclosures, etc. """ try: episode = rss_parser.get_episode(show_name, episode_number) if episode: return episode else: return {"error": f"Episode '{episode_number}' not found in show '{show_name}'"} except Exception as e: return {"error": f"Failed to retrieve episode: {str(e)}"}
- podcast_mcp/rss_parser.py:176-195 (helper)Core helper function in PodcastRSSParser that retrieves the specific episode from the cached RSS feed by matching GUID or podcast:episode number, then delegates parsing to _parse_episode.def get_episode(self, show_name: str, episode_number: str) -> Optional[Dict[str, Any]]: """Get specific episode data.""" feed_root = self._get_feed(show_name) if feed_root is None: return None # Find all item elements (episodes) items = feed_root.xpath('//item') for item in items: # Check GUID guid_elem = item.find('guid') if guid_elem is not None and guid_elem.text == episode_number: return self._parse_episode(show_name, item) # Check podcast:episode number episode_elem = item.find('.//{https://podcastindex.org/namespace/1.0}episode') if episode_elem is not None and episode_elem.text == episode_number: return self._parse_episode(show_name, item) return None