get_daily_podcast
Retrieve daily regulatory podcast audio with AI-generated summaries of banking developments from OCC, FDIC, CFPB, Federal Reserve, and state agencies.
Instructions
Get the latest daily regulatory podcast audio URL. Listen to an AI-generated summary of the day's regulatory developments.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| date | No | Optional: Specific date (YYYY-MM-DD). Defaults to today. |
Implementation Reference
- src/index.ts:169-205 (handler)The main handler function getDailyPodcast that implements the tool logic. It constructs the API URL (with optional date parameter), fetches podcast data from the API, handles errors and missing data, constructs the audio URL, and returns a formatted text response with the podcast information including date and audio URL.
async function getDailyPodcast(date?: string) { const url = date ? `${API_BASE_URL}/api/mcp/podcast?date=${date}` : `${API_BASE_URL}/api/mcp/podcast`; const response = await fetch(url); if (!response.ok) { throw new Error(`API request failed: ${response.statusText}`); } const data = await response.json() as any; if (!data.success || !data.data) { return { content: [ { type: 'text', text: 'No podcast found for the requested date.', }, ], }; } const podcast = data.data; const dateStr = new Date(podcast.sentAt).toLocaleDateString(); const audioUrl = `${API_BASE_URL}/api/podcast/${podcast.id}/audio`; return { content: [ { type: 'text', text: `# Daily Regulatory Podcast\n\n**Date:** ${dateStr}\n**Audio URL:** ${audioUrl}\n\nCopy the URL above to listen to today's regulatory briefing.\n\n---\n*Powered by BankRegPulse*`, }, ], }; } - src/index.ts:62-74 (registration)Tool registration/definition in the TOOLS array. Defines the tool name 'get_daily_podcast', its description for users, and the inputSchema specifying an optional 'date' parameter in YYYY-MM-DD format.
{ name: 'get_daily_podcast', description: 'Get the latest daily regulatory podcast audio URL. Listen to an AI-generated summary of the day\'s regulatory developments.', inputSchema: { type: 'object', properties: { date: { type: 'string', description: 'Optional: Specific date (YYYY-MM-DD). Defaults to today.', }, }, }, }, - src/index.ts:105-106 (registration)The switch case handler that routes tool calls to the getDailyPodcast function when the tool name is 'get_daily_podcast'. It extracts the optional date parameter from the tool arguments and passes it to the handler.
case 'get_daily_podcast': return await getDailyPodcast(toolArgs.date as string | undefined);