# Create application draft

`application_definitions.create`

Create an unpublished application form draft from a complete config. Read application_definitions.get_config_schema for the relevant block kinds before authoring. Returns the saved draft and revision.

[Application definitions guide](https://docs.levr.ai/mcp/resources/application_definitions.md)

Availability depends on live discovery and your access to the record. Do not infer MCP calls from REST paths.

Operation: write. Required OAuth scopes: mcp.

## Input schema

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "additionalProperties": false,
  "properties": {
    "client_request_id": {
      "description": "Stable retry key. Reuse it only for an identical create request.",
      "maxLength": 255,
      "minLength": 1,
      "type": "string"
    },
    "config": {
      "description": "Complete portable configuration. Read application_definitions.get_config_schema for the relevant block kinds before authoring.",
      "type": "object"
    },
    "provider_slug": {
      "description": "Provider that will own the new application form definition. Copy provider_slug from providers.list; named slugs are valid.",
      "maxLength": 255,
      "minLength": 1,
      "type": "string"
    }
  },
  "required": [
    "provider_slug",
    "client_request_id",
    "config"
  ],
  "type": "object"
}
```

## Output schema

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "additionalProperties": false,
  "oneOf": [
    {
      "not": {
        "required": [
          "error"
        ]
      },
      "properties": {
        "ok": {
          "const": true
        }
      },
      "required": [
        "data"
      ]
    },
    {
      "not": {
        "required": [
          "data"
        ]
      },
      "properties": {
        "ok": {
          "const": false
        }
      },
      "required": [
        "error"
      ]
    }
  ],
  "properties": {
    "data": {
      "additionalProperties": false,
      "properties": {
        "attachments": {
          "description": "Files currently attached to file or signature blocks in the draft.",
          "items": {
            "additionalProperties": false,
            "properties": {
              "block_kind": {
                "description": "Type of application block that owns the attachment.",
                "enum": [
                  "file",
                  "signature"
                ],
                "type": "string"
              },
              "file_name": {
                "description": "Stored attachment filename.",
                "minLength": 1,
                "type": "string"
              },
              "stable_block_id": {
                "description": "Durable identifier of the file or signature block that owns the attachment.",
                "maxLength": 255,
                "minLength": 1,
                "type": "string"
              }
            },
            "required": [
              "stable_block_id",
              "block_kind",
              "file_name"
            ],
            "type": "object"
          },
          "type": "array"
        },
        "config": {
          "description": "Complete saved draft configuration for this application form definition.",
          "type": "object"
        },
        "definition_slug": {
          "description": "Stable identifier of the reusable application form definition.",
          "maxLength": 255,
          "minLength": 1,
          "type": "string"
        },
        "digest": {
          "description": "SHA-256 fingerprint of the exact document content.",
          "pattern": "^[0-9a-f]{64}$",
          "type": "string"
        },
        "revision": {
          "description": "Current draft revision used for optimistic concurrency on later writes.",
          "minimum": 0,
          "type": "integer"
        }
      },
      "required": [
        "definition_slug",
        "revision",
        "digest",
        "config",
        "attachments"
      ],
      "type": "object"
    },
    "error": {
      "additionalProperties": false,
      "properties": {
        "code": {
          "type": "string"
        },
        "details": {
          "additionalProperties": true,
          "description": "Optional bounded, agent-safe correction or recovery facts.",
          "type": "object"
        },
        "message": {
          "type": "string"
        },
        "retryable": {
          "type": "boolean"
        }
      },
      "required": [
        "code",
        "message",
        "retryable"
      ],
      "type": "object"
    },
    "meta": {
      "additionalProperties": false,
      "properties": {
        "request_id": {
          "type": "string"
        }
      },
      "required": [
        "request_id"
      ],
      "type": "object"
    },
    "ok": {
      "description": "Whether the tool completed successfully.",
      "type": "boolean"
    }
  },
  "required": [
    "ok",
    "meta"
  ],
  "type": "object"
}
```

Check the result, then read the affected record to confirm your change.
