get_clip
Retrieve comprehensive details of a video clip by its unique ID. Returns export status, resolution options (720p/1080p), video URLs, thumbnail, and other metadata from your Lumiclip project.
Instructions
Returns a JSON object with full clip details: id, project_id, title, duration, score, reason, export_status, export_quality (720p/1080p), is_exported, video_url, video_url_720p, video_url_1080p, thumbnail_url, created_at, updated_at.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| clip_id | Yes | The unique clip ID from a project's clips array. |
Implementation Reference
- src/server.ts:216-232 (handler)The get_clip tool handler function. It takes clip_id, calls GET /clips/{clip_id} via the apiCall helper, and returns the clip JSON.
async ({ clip_id }) => { try { const clip = await apiCall(config, "GET", `/clips/${clip_id}`); return { content: [ { type: "text" as const, text: JSON.stringify(clip, null, 2) }, ], }; } catch (err: unknown) { const message = err instanceof Error ? err.message : String(err); return { content: [{ type: "text" as const, text: `Error: ${message}` }], isError: true, }; } } ); - src/server.ts:206-208 (schema)Input schema for get_clip: requires clip_id (string).
{ clip_id: z.string().describe("The unique clip ID from a project's clips array."), }, - src/server.ts:203-232 (registration)Tool registration using server.tool('get_clip', ...) with description, input schema, metadata hints, and handler.
server.tool( "get_clip", "Returns a JSON object with full clip details: id, project_id, title, duration, score, reason, export_status, export_quality (720p/1080p), is_exported, video_url, video_url_720p, video_url_1080p, thumbnail_url, created_at, updated_at.", { clip_id: z.string().describe("The unique clip ID from a project's clips array."), }, { title: "Get Clip", readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: true, }, async ({ clip_id }) => { try { const clip = await apiCall(config, "GET", `/clips/${clip_id}`); return { content: [ { type: "text" as const, text: JSON.stringify(clip, null, 2) }, ], }; } catch (err: unknown) { const message = err instanceof Error ? err.message : String(err); return { content: [{ type: "text" as const, text: `Error: ${message}` }], isError: true, }; } } ); - src/http.ts:61-69 (registration)Tool definition in the server card JSON, listing get_clip name, description, and input schema for the .well-known endpoint.
{ name: "get_clip", description: "Returns full clip details: id, project_id, title, duration, score, reason, export_status, export_quality, is_exported, video_url, thumbnail_url.", inputSchema: { type: "object", properties: { clip_id: { type: "string", description: "The unique clip ID from a project's clips array." } }, required: ["clip_id"], }, }, - src/server.ts:9-37 (helper)The apiCall helper used by get_clip handler to make authenticated HTTP requests to the Lumiclip API.
async function apiCall( config: ApiConfig, method: string, path: string, body?: unknown ) { const base = config.apiBase || "https://api.lumiclip.ai"; const url = `${base}/api/v1${path}`; const res = await fetch(url, { method, headers: { Authorization: `Bearer ${config.apiKey}`, "Content-Type": "application/json", }, ...(body ? { body: JSON.stringify(body) } : {}), }); const data = (await res.json()) as Record<string, unknown>; if (!res.ok) { throw new Error( (data.error as string) || (data.message as string) || `API error ${res.status}` ); } return data; }