{
  "title": "compose_workflow tool schema",
  "schemaVersion": "2026-05-14.1",
  "description": "Synchronous planner that emits a validated durable creative workflow plan from a brief.",
  "type": "object",
  "additionalProperties": false,
  "required": ["brief"],
  "properties": {
    "brief": {
      "type": "string",
      "description": "Creative brief describing what the workflow should produce. Free-form natural language. Required."
    },
    "scene_count": {
      "type": "integer",
      "minimum": 1,
      "maximum": 12,
      "description": "Suggested number of distinct shots/scenes. The planner may produce more steps than scenes (e.g., keyframe + clip per scene)."
    },
    "duration_seconds": {
      "type": "number",
      "minimum": 1,
      "maximum": 120,
      "description": "Target total duration in seconds for video-bearing plans."
    },
    "aspect_ratio": {
      "type": "string",
      "enum": ["1:1", "4:3", "3:4", "16:9", "9:16", "21:9"],
      "description": "Output aspect ratio."
    },
    "style": {
      "type": "string",
      "description": "Optional stylistic guidance (e.g., 'cinematic, neon, low-key', 'whiteboard illustration')."
    },
    "destination_models": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "image": {
          "type": "string",
          "description": "Preferred image model (e.g., 'gpt-image-2', 'qwen')."
        },
        "video": {
          "type": "string",
          "description": "Preferred video model (e.g., 'ltx25', 'ltx23', 'wan22', 'seedance2')."
        },
        "music": {
          "type": "string",
          "description": "Preferred music model."
        }
      }
    },
    "max_estimated_capacity_units": {
      "type": "integer",
      "minimum": 1,
      "description": "If set, the planner attempts to keep total estimated cost at or below this value and returns `fits_budget: false` if it cannot."
    },
    "include_audio": {
      "type": "boolean",
      "description": "If true, include a music generation step. Defaults to false."
    },
    "return_format": {
      "type": "string",
      "enum": ["json"],
      "description": "Currently `json` is the only supported value. Reserved for future."
    }
  }
}
