# Review application definition

`application_definitions.publish_review`

Preview unpublished changes and publication impact without publishing. Returns draft_revision, review_digest and review_url; use the review values with application_definitions.publish.

[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: read. Required OAuth scopes: mcp.

## Input schema

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "additionalProperties": false,
  "properties": {
    "definition_slug": {
      "description": "Application form definition returned by application_definitions.list. Prefix: appdef_.",
      "maxLength": 255,
      "minLength": 1,
      "type": "string"
    },
    "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"
    }
  },
  "required": [
    "provider_slug",
    "definition_slug"
  ],
  "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": {
        "change_summary": {
          "additionalProperties": false,
          "description": "Counts of definition, section, and block changes in the draft.",
          "properties": {
            "block_add_count": {
              "minimum": 0,
              "type": "integer"
            },
            "block_remove_count": {
              "minimum": 0,
              "type": "integer"
            },
            "block_update_count": {
              "minimum": 0,
              "type": "integer"
            },
            "definition_update_count": {
              "minimum": 0,
              "type": "integer"
            },
            "section_add_count": {
              "minimum": 0,
              "type": "integer"
            },
            "section_remove_count": {
              "minimum": 0,
              "type": "integer"
            },
            "section_update_count": {
              "minimum": 0,
              "type": "integer"
            }
          },
          "required": [
            "definition_update_count",
            "section_add_count",
            "section_remove_count",
            "section_update_count",
            "block_add_count",
            "block_remove_count",
            "block_update_count"
          ],
          "type": "object"
        },
        "changed_section_keys": {
          "description": "Stable keys of sections changed by the unpublished draft.",
          "items": {
            "description": "Stable public identifier for the referenced resource.",
            "maxLength": 255,
            "minLength": 1,
            "type": "string"
          },
          "type": "array"
        },
        "definition_slug": {
          "description": "Stable identifier of the application form definition under review.",
          "maxLength": 255,
          "minLength": 1,
          "type": "string"
        },
        "draft_block_count": {
          "description": "Number of blocks in the current draft.",
          "minimum": 0,
          "type": "integer"
        },
        "draft_revision": {
          "description": "Current unpublished draft revision reviewed by this result.",
          "minimum": 0,
          "type": "integer"
        },
        "has_unpublished_changes": {
          "description": "Whether the draft differs from its latest published version.",
          "type": "boolean"
        },
        "impact_summary": {
          "additionalProperties": false,
          "description": "Expected reach of publishing this draft across runtimes, assignments, and users.",
          "properties": {
            "active_runtime_count": {
              "minimum": 0,
              "type": "integer"
            },
            "affected_assignment_count": {
              "minimum": 0,
              "type": "integer"
            },
            "affected_context_count": {
              "minimum": 0,
              "type": "integer"
            },
            "affected_policy_count": {
              "minimum": 0,
              "type": "integer"
            },
            "affected_user_count": {
              "minimum": 0,
              "type": "integer"
            },
            "affects_existing_runtimes": {
              "type": "boolean"
            },
            "affects_future_runtime_instantiations": {
              "type": "boolean"
            }
          },
          "required": [
            "affects_future_runtime_instantiations",
            "affects_existing_runtimes",
            "active_runtime_count",
            "affected_assignment_count",
            "affected_context_count",
            "affected_user_count"
          ],
          "type": "object"
        },
        "is_initial_publish": {
          "description": "Whether publishing this draft would create the first published version.",
          "type": "boolean"
        },
        "latest_published_version": {
          "anyOf": [
            {
              "description": "Latest published version, or null when the definition has never been published.",
              "minimum": 1,
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "description": "Latest published version, or null when the definition has never been published."
        },
        "review_digest": {
          "description": "SHA-256 fingerprint of the exact publish review result.",
          "pattern": "^[0-9a-f]{64}$",
          "type": "string"
        },
        "review_url": {
          "format": "uri",
          "type": "string"
        }
      },
      "required": [
        "definition_slug",
        "draft_revision",
        "latest_published_version",
        "is_initial_publish",
        "draft_block_count",
        "has_unpublished_changes",
        "changed_section_keys",
        "change_summary",
        "impact_summary",
        "review_digest"
      ],
      "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"
}
```
