wave_mark_highlight
Mark any moment in a live stream as a highlight for later clipping. Provide a label and optional confidence score to tag key events.
Instructions
Mark a moment in a stream as a highlight for later clipping
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| stream_id | Yes | The stream ID | |
| label | No | Label for the highlight | |
| confidence | No | Confidence score (0-1, for AI-detected highlights) |
Implementation Reference
- src/tools/production.ts:214-226 (handler)Handler function for 'wave_mark_highlight' that POSTs to /api/v1/streams/{stream_id}/highlights with label, confidence, and timestamp.
async ({ stream_id, label, confidence }) => { const res = await waveFetch(`/api/v1/streams/${stream_id}/highlights`, { method: "POST", body: JSON.stringify({ label: label ?? "Highlight", confidence: confidence ?? 1.0, timestamp: new Date().toISOString(), }), }); if (!res.ok) return errorContent(res.status, res.body); return textContent(res.body); }, ); - src/tools/production.ts:204-213 (schema)Schema definition for the 'wave_mark_highlight' tool: stream_id (UUID), optional label (max 255 chars), optional confidence (0-1).
{ stream_id: z.string().uuid().describe("The stream ID"), label: z.string().max(255).optional().describe("Label for the highlight"), confidence: z .number() .min(0) .max(1) .optional() .describe("Confidence score (0-1, for AI-detected highlights)"), }, - src/tools/production.ts:201-226 (registration)Registers 'wave_mark_highlight' tool on the MCP server via server.tool() with name, description, schema, and handler.
server.tool( "wave_mark_highlight", "Mark a moment in a stream as a highlight for later clipping", { stream_id: z.string().uuid().describe("The stream ID"), label: z.string().max(255).optional().describe("Label for the highlight"), confidence: z .number() .min(0) .max(1) .optional() .describe("Confidence score (0-1, for AI-detected highlights)"), }, async ({ stream_id, label, confidence }) => { const res = await waveFetch(`/api/v1/streams/${stream_id}/highlights`, { method: "POST", body: JSON.stringify({ label: label ?? "Highlight", confidence: confidence ?? 1.0, timestamp: new Date().toISOString(), }), }); if (!res.ok) return errorContent(res.status, res.body); return textContent(res.body); }, ); - src/tools/production.ts:5-19 (helper)Helper function 'waveFetch' used by the handler to make authenticated HTTP requests to the Wave API.
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 }; } - src/server.ts:24-24 (registration)Registration call: registerProductionTools(server) invoked from the main server startup.
registerProductionTools(server);