{
  "name": "render-video",
  "toolName": "render_video",
  "tier": "orchestration",
  "category": "authoring",
  "title": "Remotion Video Renderer",
  "description": "Loads a persisted RenderPlan by job_id and drives the Remotion engine to produce the final video. Assets must already be generated via prepare_video_assets — this skill never resolves or regenerates assets.",
  "auth": "required",
  "createsTake": true,
  "createsTakeUnless": ["resolve_only"],
  "envVars": [
    "PRIV_TOKEN",
    "MM_API_BASE_URL",
    "MM_BACKEND_API_URL",
    "AGENT_NAME",
    "REMOTION_RENDER_API_URL",
    "REMOTION_RENDER_MODE",
    "REMOTION_OUTPUT_DIR",
    "ASSET_CACHE_DIR"
  ],
  "scriptPath": "scripts/render_video.py",
  "parameters": {
    "type": "object",
    "properties": {
      "job_id": {
        "type": "number",
        "minimum": 1,
        "description": "Render job id (positive integer, e.g. 8). This is the integer N parsed from prepare_video_assets's stdout line '📦 render job jobId: N' (also tolerated: legacy zh '📦 渲染任务 jobId: N'). Never pass 0, a placeholder string, or descriptive text."
      },
      "save_job": {
        "type": "boolean",
        "description": "Persist the render Manifest back to the database under the same jobId (default true). Auto-degrades to false when PRIV_TOKEN is missing. Pass false to opt out explicitly."
      },
      "upload_title": {
        "type": "string",
        "description": "Upload title for the resulting video file. Defaults to the local output filename."
      },
      "no_upload": {
        "type": "boolean",
        "description": "Skip the upload step. Only effective for local rendering; remote rendering uploads server-side."
      },
      "renderer": {
        "type": "string",
        "enum": [
          "local",
          "remote"
        ],
        "description": "Render mode: local runs the Remotion CLI on this host; remote calls the standalone remotion-renderer service. Defaults to REMOTION_RENDER_MODE."
      },
      "render_plan": {
        "type": "string",
        "description": "Existing RenderPlan file path. Local / single-user fallback used only when job_id is unavailable; prefer job_id."
      }
    },
    "required": [
      "job_id"
    ]
  }
}
