wave_start_captions
Start real-time captions on a stream. Provide its ID, optional language (ISO 639-1), and transcription provider to begin.
Instructions
Start real-time captions/transcription on a stream
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| stream_id | Yes | The stream ID | |
| language | No | ISO 639-1 language code (default: en) | |
| provider | No | Transcription provider (default: deepgram) |
Implementation Reference
- src/tools/production.ts:173-199 (handler)Tool 'wave_start_captions' handler: calls POST /api/v1/streams/{stream_id}/captions/start with language and provider options.
server.tool( "wave_start_captions", "Start real-time captions/transcription on a stream", { stream_id: z.string().uuid().describe("The stream ID"), language: z .string() .length(2) .optional() .describe("ISO 639-1 language code (default: en)"), provider: z .enum(["deepgram", "assemblyai", "cohere"]) .optional() .describe("Transcription provider (default: deepgram)"), }, async ({ stream_id, language, provider }) => { const res = await waveFetch(`/api/v1/streams/${stream_id}/captions/start`, { method: "POST", body: JSON.stringify({ language: language ?? "en", provider: provider ?? "deepgram", }), }); if (!res.ok) return errorContent(res.status, res.body); return textContent(res.body); }, ); - src/tools/production.ts:176-187 (schema)Input schema for wave_start_captions: stream_id (uuid, required), language (2-char ISO code, optional), provider (deepgram|assemblyai|cohere, optional).
{ stream_id: z.string().uuid().describe("The stream ID"), language: z .string() .length(2) .optional() .describe("ISO 639-1 language code (default: en)"), provider: z .enum(["deepgram", "assemblyai", "cohere"]) .optional() .describe("Transcription provider (default: deepgram)"), }, - src/tools/production.ts:173-199 (registration)Tool registered via server.tool('wave_start_captions', ...) inside registerProductionTools.
server.tool( "wave_start_captions", "Start real-time captions/transcription on a stream", { stream_id: z.string().uuid().describe("The stream ID"), language: z .string() .length(2) .optional() .describe("ISO 639-1 language code (default: en)"), provider: z .enum(["deepgram", "assemblyai", "cohere"]) .optional() .describe("Transcription provider (default: deepgram)"), }, async ({ stream_id, language, provider }) => { const res = await waveFetch(`/api/v1/streams/${stream_id}/captions/start`, { method: "POST", body: JSON.stringify({ language: language ?? "en", provider: provider ?? "deepgram", }), }); if (!res.ok) return errorContent(res.status, res.body); return textContent(res.body); }, ); - src/tools/production.ts:32-32 (registration)Function registerProductionTools is exported and called from server.ts to register all production tools.
export function registerProductionTools(server: McpServer): void { - src/tools/production.ts:5-19 (helper)waveFetch helper: makes authenticated fetch requests to the Wave API with base URL and auth headers.
async function waveFetch( path: string, init?: RequestInit, ): Promise<{ ok: boolean; status: number; body: string }> { const url = `${getBaseUrl()}${path}`; const res = await fetch(url, { ...init, headers: { ...getAuthHeaders(), ...init?.headers, }, }); const body = await res.text(); return { ok: res.ok, status: res.status, body }; }