{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "$id": "https://adcontextprotocol.org/schemas/3.2.0-beta.0/creative/list-creatives-request.json",
  "title": "List Creatives Request",
  "description": "Request parameters for querying creative assets from a creative library with filtering, sorting, and pagination. Implemented by any agent that hosts a creative library — creative agents (ad servers, creative platforms) and sales agents that manage creatives.",
  "x-tool-summary": "List creative-library assets with filtering, sorting, and pagination.",
  "type": "object",
  "allOf": [
    {
      "$ref": "https://adcontextprotocol.org/schemas/3.2.0-beta.0/core/version-envelope.json"
    },
    {
      "if": {
        "properties": {
          "include_pricing": {
            "const": true
          }
        },
        "required": [
          "include_pricing"
        ]
      },
      "then": {
        "required": [
          "account"
        ]
      }
    },
    {
      "if": {
        "properties": {
          "assignment_projection": {
            "const": "matching"
          }
        },
        "required": [
          "assignment_projection"
        ]
      },
      "then": {
        "required": [
          "filters"
        ],
        "properties": {
          "filters": {
            "required": [
              "indicator_types"
            ]
          }
        }
      }
    }
  ],
  "properties": {
    "filters": {
      "$ref": "https://adcontextprotocol.org/schemas/3.2.0-beta.0/core/creative-filters.json"
    },
    "sort": {
      "type": "object",
      "description": "Sorting parameters",
      "properties": {
        "field": {
          "$ref": "https://adcontextprotocol.org/schemas/3.2.0-beta.0/enums/creative-sort-field.json",
          "default": "created_date",
          "description": "Field to sort by"
        },
        "direction": {
          "$ref": "https://adcontextprotocol.org/schemas/3.2.0-beta.0/enums/sort-direction.json",
          "default": "desc",
          "description": "Sort direction"
        }
      },
      "additionalProperties": true
    },
    "pagination": {
      "$ref": "https://adcontextprotocol.org/schemas/3.2.0-beta.0/core/pagination-request.json"
    },
    "include_assignments": {
      "type": "boolean",
      "default": true,
      "description": "Include package assignment information in response"
    },
    "assignment_projection": {
      "type": "string",
      "enum": [
        "all",
        "matching"
      ],
      "default": "all",
      "description": "Controls nested assigned_packages projection when assignments are included. all returns up to assignment_limit active assignments per creative. matching returns only assignments matching filters.indicator_types and requires that filter. Use matching for compact indicator discovery; get_media_buys remains the complete authoritative repair path when assignments_truncated is true."
    },
    "assignment_limit": {
      "type": "integer",
      "minimum": 1,
      "maximum": 200,
      "default": 50,
      "description": "Maximum assigned_packages rows returned per creative. Sellers MUST set assignments.assignments_truncated when additional qualifying rows exist."
    },
    "include_snapshot": {
      "type": "boolean",
      "default": false,
      "description": "Include a lightweight delivery snapshot per creative (lifetime impressions and last-served date). For detailed performance analytics, use get_creative_delivery."
    },
    "include_items": {
      "type": "boolean",
      "default": false,
      "description": "Include items for multi-asset formats like carousels and native ads"
    },
    "include_variables": {
      "type": "boolean",
      "default": false,
      "description": "Include dynamic content variable definitions (DCO slots) for each creative"
    },
    "include_pricing": {
      "type": "boolean",
      "default": false,
      "description": "Include pricing_options on each creative. Requires account to be provided. When false or omitted, pricing is not computed."
    },
    "include_purged": {
      "type": "boolean",
      "default": false,
      "description": "Include soft-purged creative tombstones in the result set. When true, creatives destroyed via `creative.purged` with `purge_kind: soft` surface as tombstone records carrying `purged: true`, `purged_at`, and the purge reason — within the seller's webhook activity retention window (30 days from `purged_at`, MUST match `webhook-activity-record` retention). Hard-purged creatives MUST NOT appear regardless of this flag. When false or omitted, the result set excludes all purged creatives — same default as today."
    },
    "include_webhook_activity": {
      "type": "boolean",
      "default": false,
      "description": "Include recent webhook activity per creative. When true, each returned creative carries a `webhook_activity[]` array of the most recent fires scoped to that creative — `creative.status_changed` and `creative.purged` deliveries. Adoption of the `webhook_activity[]` pattern per `snapshot-and-log.mdx § Webhook activity log pattern`. Retention is 30 days from `completed_at` (MUST). Three-state presence applies: omitted = seller does not surface; `[]` = persists but no recent fires; non-empty = actual records."
    },
    "webhook_activity_limit": {
      "type": "integer",
      "default": 50,
      "minimum": 1,
      "maximum": 200,
      "description": "Maximum number of `webhook_activity[]` records to return per creative. Only meaningful when `include_webhook_activity: true`. Sellers MUST respect the cap; structural enforcement is provided by the response schema's `maxItems: 200` on the array."
    },
    "account": {
      "$ref": "https://adcontextprotocol.org/schemas/3.2.0-beta.0/core/account-ref.json",
      "description": "Account reference for pricing and access. When provided with include_pricing, the agent returns pricing_options from this account's rate card on each creative."
    },
    "fields": {
      "type": "array",
      "description": "Specific fields to include in response (omit for all fields). The 'concept' value returns both concept_id and concept_name. `format_id` is a deprecated 3.x compatibility projection; new integrations request `format_kind` and `format_option_ref`. Selecting localization automatically includes creative_id, status, assets, the selected format identity, and localization_unavailable when applicable. Selecting rights_attestation_evaluations automatically includes rights so each seller-produced result can be reconciled with the exact retained constraint and reference.",
      "minItems": 1,
      "items": {
        "type": "string",
        "enum": [
          "creative_id",
          "name",
          "format_id",
          "format_kind",
          "format_option_ref",
          "assets",
          "status",
          "created_date",
          "updated_date",
          "tags",
          "rights",
          "rights_attestation_evaluations",
          "localization",
          "localization_unavailable",
          "assignments",
          "snapshot",
          "items",
          "variables",
          "concept",
          "pricing_options"
        ]
      }
    },
    "context": {
      "$ref": "https://adcontextprotocol.org/schemas/3.2.0-beta.0/core/context.json"
    },
    "ext": {
      "$ref": "https://adcontextprotocol.org/schemas/3.2.0-beta.0/core/ext.json"
    }
  },
  "additionalProperties": true,
  "examples": [
    {
      "description": "List all approved creatives",
      "data": {
        "filters": {
          "statuses": [
            "approved"
          ]
        }
      }
    },
    {
      "description": "List creatives in a specific concept matching a format",
      "data": {
        "filters": {
          "concept_ids": [
            "concept_holiday_2026"
          ],
          "format_kinds": [
            "image"
          ]
        },
        "include_variables": true
      }
    },
    {
      "description": "Find DCO creatives for dynamic campaigns",
      "data": {
        "filters": {
          "has_variables": true,
          "statuses": [
            "approved"
          ]
        },
        "include_variables": true
      }
    },
    {
      "description": "Lightweight list with minimal fields",
      "data": {
        "fields": [
          "creative_id",
          "name",
          "status"
        ],
        "include_assignments": false
      }
    },
    {
      "description": "List creatives with account-specific pricing",
      "data": {
        "account": {
          "account_id": "acct_acme_creative"
        },
        "include_pricing": true,
        "filters": {
          "statuses": [
            "approved"
          ]
        }
      }
    },
    {
      "description": "List approved creatives plus recent webhook activity, including purged tombstones",
      "data": {
        "filters": {
          "statuses": [
            "approved"
          ]
        },
        "include_purged": true,
        "include_webhook_activity": true,
        "webhook_activity_limit": 25
      }
    }
  ]
}
