# Publish reviewed application definition

`application_definitions.publish`

Publish the exact draft reviewed by publish_review. First establish the user's intent and explain the review's effects and affected-assignment count. Pass its draft_revision as expected_revision and its review_digest. Future applications using this definition can use the new version; existing applications are not rewritten. This does not submit an application or change workflow defaults. Re-read after completion.

[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": {
      "maxLength": 255,
      "minLength": 1,
      "type": "string"
    },
    "definition_slug": {
      "description": "Application form definition returned by application_definitions.list. Prefix: appdef_.",
      "maxLength": 255,
      "minLength": 1,
      "type": "string"
    },
    "expected_revision": {
      "description": "Copy revision from application_definitions.get_config; a stale value rejects the write.",
      "minimum": 0,
      "type": "integer"
    },
    "provider_slug": {
      "description": "Provider that owns the application form definition. Copy provider_slug from providers.list; named slugs are valid.",
      "maxLength": 255,
      "minLength": 1,
      "type": "string"
    },
    "review_digest": {
      "description": "Copy review_digest from application_definitions.publish_review; not the document content digest.",
      "pattern": "^[0-9a-f]{64}$",
      "type": "string"
    },
    "user_confirmed": {
      "const": true,
      "type": "boolean"
    }
  },
  "required": [
    "provider_slug",
    "definition_slug",
    "review_digest",
    "expected_revision",
    "client_request_id",
    "user_confirmed"
  ],
  "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": {
        "definition_slug": {
          "description": "Stable public identifier for the referenced resource.",
          "maxLength": 255,
          "minLength": 1,
          "type": "string"
        },
        "published_version": {
          "type": "integer"
        }
      },
      "required": [
        "definition_slug",
        "published_version"
      ],
      "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.
