wave_create_production
Create a new studio production with multi-camera support. Configure title, layout, stream sources, and recording settings.
Instructions
Create a new studio production with multi-camera support
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| title | Yes | Production title | |
| description | No | Production description | |
| layout | No | Initial layout mode (default: single) | |
| stream_ids | No | Stream IDs to include as sources in the production | |
| record | No | Enable recording for this production (default: false) |
Implementation Reference
- src/tools/studio.ts:89-104 (handler)The handler function that executes the 'wave_create_production' tool logic. It builds a payload from the parameters (title, description, layout, stream_ids, record) and sends a POST request to /api/v1/studio/productions.
async ({ title, description, layout, stream_ids, record }) => { const payload: Record<string, unknown> = { title }; if (description !== undefined) payload["description"] = description; if (layout !== undefined) payload["layout"] = layout; if (stream_ids !== undefined) payload["stream_ids"] = stream_ids; if (record !== undefined) payload["record"] = record; const res = await waveFetch("/api/v1/studio/productions", { method: "POST", body: JSON.stringify(payload), }); if (!res.ok) return errorContent(res.status, res.body); return textContent(res.body); }, ); - src/tools/studio.ts:72-88 (schema)The input schema definition for the tool, defining parameters: title (required string 1-255 chars), description (optional string max 2000), layout (optional enum: single/split/pip/grid/custom), stream_ids (optional array of UUIDs), record (optional boolean).
"Create a new studio production with multi-camera support", { title: z.string().min(1).max(255).describe("Production title"), description: z.string().max(2000).optional().describe("Production description"), layout: z .enum(["single", "split", "pip", "grid", "custom"]) .optional() .describe("Initial layout mode (default: single)"), stream_ids: z .array(z.string().uuid()) .optional() .describe("Stream IDs to include as sources in the production"), record: z .boolean() .optional() .describe("Enable recording for this production (default: false)"), }, - src/tools/studio.ts:70-104 (registration)The tool registration using server.tool() with name 'wave_create_production' inside the registerStudioTools function. This is how the tool is exposed to the MCP client.
server.tool( "wave_create_production", "Create a new studio production with multi-camera support", { title: z.string().min(1).max(255).describe("Production title"), description: z.string().max(2000).optional().describe("Production description"), layout: z .enum(["single", "split", "pip", "grid", "custom"]) .optional() .describe("Initial layout mode (default: single)"), stream_ids: z .array(z.string().uuid()) .optional() .describe("Stream IDs to include as sources in the production"), record: z .boolean() .optional() .describe("Enable recording for this production (default: false)"), }, async ({ title, description, layout, stream_ids, record }) => { const payload: Record<string, unknown> = { title }; if (description !== undefined) payload["description"] = description; if (layout !== undefined) payload["layout"] = layout; if (stream_ids !== undefined) payload["stream_ids"] = stream_ids; if (record !== undefined) payload["record"] = record; const res = await waveFetch("/api/v1/studio/productions", { method: "POST", body: JSON.stringify(payload), }); if (!res.ok) return errorContent(res.status, res.body); return textContent(res.body); }, ); - src/tools/studio.ts:5-19 (helper)The waveFetch helper function 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 }; }