get_transcript
Retrieve transcript text for Jupiter Broadcasting podcast episodes by specifying show name and episode number to access content details.
Instructions
Get the transcript for a specific episode.
Args: show_name: Name of the show episode_number: Episode number
Returns: Dictionary containing the transcript text or error message.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| show_name | Yes | ||
| episode_number | Yes |
Input Schema (JSON Schema)
{
"properties": {
"episode_number": {
"type": "string"
},
"show_name": {
"type": "string"
}
},
"required": [
"show_name",
"episode_number"
],
"type": "object"
}
Implementation Reference
- podcast_mcp/server.py:90-108 (handler)MCP tool handler for 'get_transcript'. Handles input parameters, calls the rss_parser helper, and formats the response or error as a dictionary.@mcp.tool() def get_transcript(show_name: str, episode_number: str) -> Dict[str, Any]: """Get the transcript for a specific episode. Args: show_name: Name of the show episode_number: Episode number Returns: Dictionary containing the transcript text or error message. """ try: transcript = rss_parser.get_transcript(show_name, episode_number) if transcript: return {"transcript": transcript} else: return {"error": f"Transcript not available for episode '{episode_number}' in show '{show_name}'"} except Exception as e: return {"error": f"Failed to retrieve transcript: {str(e)}"}
- podcast_mcp/rss_parser.py:197-214 (helper)Core helper function in PodcastRSSParser class that retrieves the episode data, extracts the transcript URL, fetches the transcript content from the URL, and returns the raw text or None if unavailable.def get_transcript(self, show_name: str, episode_number: str) -> Optional[str]: """Get transcript for an episode.""" episode = self.get_episode(show_name, episode_number) if not episode: return None transcript_url = episode.get("transcript_url") if not transcript_url: return None try: response = requests.get(transcript_url, timeout=30) response.raise_for_status() return response.text except Exception as e: print(f"Error fetching transcript: {e}") return None
- podcast_mcp/server.py:90-90 (registration)The @mcp.tool() decorator registers the get_transcript function as an MCP tool.@mcp.tool()
- podcast_mcp/server.py:91-100 (schema)Function signature and docstring define the input schema (show_name: str, episode_number: str) and output schema (Dict[str, Any] with 'transcript' or 'error').def get_transcript(show_name: str, episode_number: str) -> Dict[str, Any]: """Get the transcript for a specific episode. Args: show_name: Name of the show episode_number: Episode number Returns: Dictionary containing the transcript text or error message. """