get_flowspeech_status
Check the current generation status and retrieve audio URLs, scripts, and metadata for a FlowSpeech episode in the ListenHub MCP Server.
Instructions
Query detailed information of a FlowSpeech episode, including generation status, audio URLs, scripts, outline, and metadata. Does not poll - returns current status immediately.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| episodeId | Yes | The FlowSpeech episode ID |
Implementation Reference
- source/tools/flowspeech.ts:187-218 (handler)The async execute function that implements the tool logic: logs the query, calls client.flowspeech.getFlowspeechStatus(episodeId), handles errors, and returns formatted episode information.async execute(args: {episodeId: string}, {log}: {log: any}) { try { log.info('Querying FlowSpeech episode status', { episodeId: args.episodeId, }); const response = await client.flowspeech.getFlowspeechStatus( args.episodeId, ); if (response.code !== 0) { return `Failed to query episode: ${response.message ?? 'Unknown error'}`; } if (!response.data) { return 'Episode not found'; } log.info('FlowSpeech episode status retrieved', { episodeId: args.episodeId, status: response.data.processStatus, }); return `FlowSpeech Episode Information\n\n${formatFlowspeechEpisode(response.data)}`; } catch (error) { const errorMessage = formatError(error); log.error('Failed to query FlowSpeech episode status', { error: errorMessage, }); return `Failed to query FlowSpeech episode status: ${errorMessage}`; } },
- source/tools/flowspeech.ts:179-181 (schema)Zod schema defining the input parameters: episodeId as a non-empty string.parameters: z.object({ episodeId: z.string().min(1).describe('The FlowSpeech episode ID'), }),
- source/tools/flowspeech.ts:175-219 (registration)FastMCP server.addTool call that registers the 'get_flowspeech_status' tool, including name, description, parameters, annotations, and handler.server.addTool({ name: 'get_flowspeech_status', description: 'Query detailed information of a FlowSpeech episode, including generation status, audio URLs, scripts, outline, and metadata. Does not poll - returns current status immediately.', parameters: z.object({ episodeId: z.string().min(1).describe('The FlowSpeech episode ID'), }), annotations: { title: 'Get FlowSpeech Status', openWorldHint: true, readOnlyHint: true, }, async execute(args: {episodeId: string}, {log}: {log: any}) { try { log.info('Querying FlowSpeech episode status', { episodeId: args.episodeId, }); const response = await client.flowspeech.getFlowspeechStatus( args.episodeId, ); if (response.code !== 0) { return `Failed to query episode: ${response.message ?? 'Unknown error'}`; } if (!response.data) { return 'Episode not found'; } log.info('FlowSpeech episode status retrieved', { episodeId: args.episodeId, status: response.data.processStatus, }); return `FlowSpeech Episode Information\n\n${formatFlowspeechEpisode(response.data)}`; } catch (error) { const errorMessage = formatError(error); log.error('Failed to query FlowSpeech episode status', { error: errorMessage, }); return `Failed to query FlowSpeech episode status: ${errorMessage}`; } }, });
- source/client/flowspeech.ts:34-41 (helper)FlowspeechClient.getFlowspeechStatus method that performs the HTTP GET request to '/v1/flow-speech/episodes/{episodeId}' and returns the API response.async getFlowspeechStatus( episodeId: string, ): Promise<ApiResponse<FlowspeechEpisodeInfo>> { const response = await this.axiosInstance.get< ApiResponse<FlowspeechEpisodeInfo> >(`/v1/flow-speech/episodes/${episodeId}`); return response.data; }