# create_project

**Create empty marketplace project** · Changes data

Create an empty project in one marketplace.

- A normalized matching name joins its existing group and shares its variation setting and slot.
- Optional project labels replace assignments throughout that group.
- If any assignment is removed, returns an exact confirmation plan without creating the project; show it and wait for explicit confirmation before `execute_removal`.
- Otherwise commits immediately and costs 5 credits.
- Resolve marketplace ambiguity first.
- Do not blindly repeat after uncertain delivery; inspect `list_projects`.

## Input

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `project_name` | `string` | Required | Project-group name. Surrounding ASCII whitespace is trimmed; matching names join the existing group. Maximum length 10000. |
| `label_ids` | `integer[]` | Optional | Replacement project-label IDs for every marketplace in the group. Omit to retain assignments. At most 1000 items. |
| `marketplace` | `string` | Required | Supported marketplace code from the server instructions. Maximum length 16. |
| `should_track_variations` | `boolean` | Optional | Variation tracking for a new group; must match when joining an existing group. |

## Output

Read this object from the result's `structuredContent`. The result's `content` carries a text version for the model, which is not always the same JSON.

The result is one of 2 shapes.

### Variant 1

Fields of `data`:

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `plan_reference` | `string` | Required | Pattern `^[A-Za-z0-9_-]{43}$`. |
| `operation` | `string` | Required |  |
| `expires_at` | `string (date-time)` | Required |  |
| `targets` | `object[]` | Required |  |
| `consequences` | `object[]` | Required |  |
| `instructions` | `string` | Required |  |


### Variant 2

Fields of `data`:

| Name | Type | Required |
| --- | --- | --- |
| `operation` | `"create_project"` | Required |
| `committed` | `true` | Required |
| `recovered` | `boolean` | Required |
| `outcome` | `object` | Required |

#### `data.outcome`

| Name | Type | Required |
| --- | --- | --- |
| `project` | `ProjectSummary` | Required |

<details>
<summary>Full input and output JSON Schema</summary>

```json
{
  "inputSchema": {
    "type": "object",
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "properties": {
      "project_name": {
        "type": "string",
        "maxLength": 10000,
        "description": "Project-group name. Surrounding ASCII whitespace is trimmed; matching names join the existing group."
      },
      "label_ids": {
        "maxItems": 1000,
        "type": "array",
        "items": {
          "type": "integer",
          "minimum": 1,
          "maximum": 2147483647
        },
        "description": "Replacement project-label IDs for every marketplace in the group. Omit to retain assignments."
      },
      "marketplace": {
        "type": "string",
        "maxLength": 16,
        "description": "Supported marketplace code from the server instructions."
      },
      "should_track_variations": {
        "description": "Variation tracking for a new group; must match when joining an existing group.",
        "type": "boolean"
      }
    },
    "required": [
      "project_name",
      "marketplace"
    ],
    "additionalProperties": false
  },
  "outputSchema": {
    "type": "object",
    "required": [
      "data"
    ],
    "anyOf": [
      {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "object",
            "required": [
              "plan_reference",
              "operation",
              "expires_at",
              "targets",
              "consequences",
              "instructions"
            ],
            "properties": {
              "plan_reference": {
                "type": "string",
                "pattern": "^[A-Za-z0-9_-]{43}$"
              },
              "operation": {
                "type": "string"
              },
              "expires_at": {
                "type": "string",
                "format": "date-time"
              },
              "targets": {
                "type": "array",
                "items": {
                  "type": "object",
                  "additionalProperties": true
                }
              },
              "consequences": {
                "type": "array",
                "items": {
                  "type": "object",
                  "additionalProperties": true
                }
              },
              "instructions": {
                "type": "string"
              }
            }
          }
        }
      },
      {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "object",
            "required": [
              "operation",
              "committed",
              "recovered",
              "outcome"
            ],
            "properties": {
              "operation": {
                "const": "create_project"
              },
              "committed": {
                "const": true
              },
              "recovered": {
                "type": "boolean"
              },
              "outcome": {
                "type": "object",
                "required": [
                  "project"
                ],
                "properties": {
                  "project": {
                    "$ref": "#/$defs/ProjectSummary"
                  }
                }
              }
            }
          }
        }
      }
    ],
    "$defs": {
      "ProjectSummary": {
        "type": "object",
        "required": [
          "project_id",
          "project_name",
          "created_at",
          "marketplace",
          "should_track_variations",
          "keywords_count",
          "asins_count",
          "labels"
        ],
        "properties": {
          "project_id": {
            "type": "integer"
          },
          "project_name": {
            "type": "string"
          },
          "created_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date",
            "description": "Creation date, or null when no creation date is stored."
          },
          "marketplace": {
            "type": "string"
          },
          "should_track_variations": {
            "type": "boolean",
            "description": "Whether rank metrics also count tracked variations of each ASIN. Shared by every marketplace project in the group."
          },
          "keywords_count": {
            "type": "integer",
            "description": "Keywords attached to this marketplace project."
          },
          "asins_count": {
            "type": "integer",
            "description": "ASINs attached to this marketplace project."
          },
          "labels": {
            "type": "array",
            "items": {
              "$ref": "#/$defs/Label"
            }
          }
        }
      },
      "Label": {
        "type": "object",
        "required": [
          "label_id",
          "label_name",
          "color"
        ],
        "properties": {
          "label_name": {
            "type": "string"
          },
          "color": {
            "type": "string"
          },
          "label_id": {
            "type": "integer",
            "minimum": 1,
            "maximum": 2147483647
          }
        },
        "description": "A label assigned in this result. The default app color is returned as `gray`."
      }
    }
  }
}
```

</details>
