wave_list_productions
List studio productions in your WAVE account with optional filters for status, limit, and offset. Paginate results to manage large sets.
Instructions
List all studio productions in your WAVE account
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Maximum number of productions to return (1-100, default 25) | |
| offset | No | Number of productions to skip for pagination (default 0) | |
| status | No | Filter by production status |
Implementation Reference
- src/tools/studio.ts:55-67 (handler)The async handler function that executes the wave_list_productions tool logic. It constructs query params (limit, offset, status), calls the WAVE API endpoint /api/v1/studio/productions, and returns the response.
async ({ limit, offset, status }) => { const params = new URLSearchParams(); params.set("limit", String(limit ?? 25)); params.set("offset", String(offset ?? 0)); if (status && status !== "all") { params.set("status", status); } const res = await waveFetch(`/api/v1/studio/productions?${params.toString()}`); if (!res.ok) return errorContent(res.status, res.body); return textContent(res.body); }, - src/tools/studio.ts:36-54 (schema)Zod schema definitions for the tool's input parameters: limit (1-100 int, optional), offset (non-negative int, optional), and status (enum: draft/live/ended/all, optional).
{ limit: z .number() .int() .min(1) .max(100) .optional() .describe("Maximum number of productions to return (1-100, default 25)"), offset: z .number() .int() .min(0) .optional() .describe("Number of productions to skip for pagination (default 0)"), status: z .enum(["draft", "live", "ended", "all"]) .optional() .describe("Filter by production status"), }, - src/tools/studio.ts:32-68 (registration)The registration call that registers the tool via server.tool() with name 'wave_list_productions' and description 'List all studio productions in your WAVE account'.
export function registerStudioTools(server: McpServer): void { server.tool( "wave_list_productions", "List all studio productions in your WAVE account", { limit: z .number() .int() .min(1) .max(100) .optional() .describe("Maximum number of productions to return (1-100, default 25)"), offset: z .number() .int() .min(0) .optional() .describe("Number of productions to skip for pagination (default 0)"), status: z .enum(["draft", "live", "ended", "all"]) .optional() .describe("Filter by production status"), }, async ({ limit, offset, status }) => { const params = new URLSearchParams(); params.set("limit", String(limit ?? 25)); params.set("offset", String(offset ?? 0)); if (status && status !== "all") { params.set("status", status); } const res = await waveFetch(`/api/v1/studio/productions?${params.toString()}`); if (!res.ok) return errorContent(res.status, res.body); return textContent(res.body); }, ); - src/tools/studio.ts:5-19 (helper)Helper function waveFetch used by the handler to make authenticated API 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/tools/studio.ts:21-29 (helper)Helper functions textContent and errorContent used to format successful and error responses.
function textContent(text: string): { content: Array<{ type: "text"; text: string }> } { return { content: [{ type: "text" as const, text }] }; } function errorContent( status: number, body: string, ): { content: Array<{ type: "text"; text: string }> } { return textContent(`Error ${status}: ${body}`);