# Review application template attachment change

`deal_application_editor.review_attachment_change`

Review setting or removing the PDF template attached to a file question in this Portal's draft. Read get_config and open the draft first. For set, hash the exact PDF and provide filename, size_bytes and content_sha256; for remove, omit those fields. Signature blocks are unsupported. This does not stage bytes, publish, notify participants, or change submitted answer files. Review the returned effects before prepare_attachment_upload, set_attachment, or remove_attachment with this digest and revisions. This toolset requires a specific grant and is not assigned by default; request access through Support.

[Deal application editor guide](https://docs.staging.levr.ai/mcp/resources/deal_application_editor.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": {
    "action": {
      "description": "Set requires filename, content_sha256, and size_bytes. Remove forbids these file fields.",
      "enum": [
        "set",
        "remove"
      ],
      "type": "string"
    },
    "content_sha256": {
      "description": "SHA-256 digest of the exact proposed PDF bytes.",
      "pattern": "^[0-9a-f]{64}$",
      "type": "string"
    },
    "deal_id": {
      "description": "Exact Deal id from deals.list or deals.get in the selected provider workspace; do not pass an application or runtime ID.",
      "maxLength": 32,
      "minLength": 1,
      "pattern": "^deal_[a-z0-9]+$",
      "type": "string"
    },
    "filename": {
      "description": "PDF filename only, without a directory path.",
      "maxLength": 255,
      "minLength": 1,
      "pattern": "\\.[pP][dD][fF]$",
      "type": "string"
    },
    "provider_slug": {
      "description": "Provider workspace returned by providers.list.",
      "maxLength": 255,
      "minLength": 1,
      "type": "string"
    },
    "size_bytes": {
      "maximum": 26214400,
      "minimum": 1,
      "type": "integer"
    },
    "stable_block_id": {
      "description": "Exact stable_block_id of a file block from get_config; signatures are unsupported.",
      "maxLength": 64,
      "minLength": 1,
      "type": "string"
    }
  },
  "required": [
    "provider_slug",
    "deal_id",
    "stable_block_id",
    "action"
  ],
  "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": {
        "action": {
          "description": "Set requires filename, content_sha256, and size_bytes. Remove forbids these file fields.",
          "enum": [
            "set",
            "remove"
          ],
          "type": "string"
        },
        "content_sha256": {
          "anyOf": [
            {
              "description": "SHA-256 fingerprint of the exact document content.",
              "pattern": "^[0-9a-f]{64}$",
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "description": "SHA-256 fingerprint of the exact document content."
        },
        "current_attachment": {
          "anyOf": [
            {
              "additionalProperties": false,
              "properties": {
                "file_name": {
                  "anyOf": [
                    {
                      "maxLength": 1000,
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "has_attachment": {
                  "type": "boolean"
                },
                "source": {
                  "description": "Whether this draft uses a published template, a staged override, or no attachment.",
                  "enum": [
                    "live",
                    "draft",
                    "none"
                  ],
                  "type": "string"
                },
                "stable_block_id": {
                  "maxLength": 64,
                  "minLength": 1,
                  "type": "string"
                }
              },
              "required": [
                "stable_block_id",
                "has_attachment",
                "file_name",
                "source"
              ],
              "type": "object"
            },
            {
              "type": "null"
            }
          ]
        },
        "draft_revision": {
          "description": "SHA-256 fingerprint of the exact document content.",
          "pattern": "^[0-9a-f]{64}$",
          "type": "string"
        },
        "effects": {
          "maxLength": 2000,
          "type": "string"
        },
        "filename": {
          "anyOf": [
            {
              "description": "PDF filename only, without a directory path.",
              "maxLength": 255,
              "minLength": 1,
              "pattern": "\\.[pP][dD][fF]$",
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "description": "PDF filename only, without a directory path."
        },
        "live_revision": {
          "description": "SHA-256 fingerprint of the exact document content.",
          "pattern": "^[0-9a-f]{64}$",
          "type": "string"
        },
        "review_digest": {
          "description": "SHA-256 fingerprint of the exact document content.",
          "pattern": "^[0-9a-f]{64}$",
          "type": "string"
        },
        "size_bytes": {
          "anyOf": [
            {
              "maximum": 26214400,
              "minimum": 1,
              "type": "integer"
            },
            {
              "type": "null"
            }
          ]
        },
        "stable_block_id": {
          "description": "Exact stable_block_id of a file block from get_config; signatures are unsupported.",
          "maxLength": 64,
          "minLength": 1,
          "type": "string"
        }
      },
      "required": [
        "stable_block_id",
        "action",
        "filename",
        "content_sha256",
        "size_bytes",
        "current_attachment",
        "live_revision",
        "draft_revision",
        "review_digest",
        "effects"
      ],
      "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"
}
```
