# Prepare reviewed application template upload

`matchmaking_application_editor.prepare_attachment_upload`

Authorize a five-minute upload of the exact PDF reviewed by review_attachment_change(action=set). Copy filename/content_sha256/size_bytes unchanged and review_digest plus both revisions to expected_live_revision and expected_draft_revision. This changes only the draft. Use transfer_token as the Bearer credential when POSTing multipart attachment outside the model. Only file blocks and PDFs up to 25 MiB are supported. The draft changes only after redemption, which repeats live access and state checks. Returned receipt is authoritative. This does not publish, notify, or change submitted answer files. Uncertain retries reuse identical arguments, bytes, and client_request_id. Keep credentials out of logs. This toolset requires a specific grant and is not assigned by default; request access through Support. Saved drafts and published question changes can mark earlier matching results as out of date. These tools do not rerun matching, contact recipients or create Deals.

[Matchmaking criteria editor guide](https://docs.staging.levr.ai/mcp/resources/matchmaking_application_editor.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": "Unique mutation identity; uncertain retries use identical arguments and the same key.",
      "maxLength": 255,
      "minLength": 1,
      "pattern": "\\S",
      "type": "string"
    },
    "content_sha256": {
      "description": "SHA-256 digest of the exact proposed PDF bytes.",
      "pattern": "^[0-9a-f]{64}$",
      "type": "string"
    },
    "expected_draft_revision": {
      "description": "Copy draft_revision from the same current action review.",
      "pattern": "^[0-9a-f]{64}$",
      "type": "string"
    },
    "expected_live_revision": {
      "description": "Copy live_revision from the current action review.",
      "pattern": "^[0-9a-f]{64}$",
      "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"
    },
    "review_digest": {
      "description": "SHA-256 fingerprint of the exact document content.",
      "pattern": "^[0-9a-f]{64}$",
      "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"
    },
    "user_confirmed": {
      "type": "boolean"
    },
    "workspace_slug": {
      "description": "Matching workspace from projects.list or projects.get; use workspace_slug, not the Project id.",
      "maxLength": 32,
      "minLength": 1,
      "pattern": "^mmw_[a-z0-9]+$",
      "type": "string"
    }
  },
  "required": [
    "provider_slug",
    "workspace_slug",
    "stable_block_id",
    "expected_live_revision",
    "expected_draft_revision",
    "review_digest",
    "client_request_id",
    "filename",
    "content_sha256",
    "size_bytes"
  ],
  "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": {
        "expires_in_seconds": {
          "type": "integer"
        },
        "instructions": {
          "type": "string"
        },
        "method": {
          "enum": [
            "GET",
            "POST"
          ],
          "type": "string"
        },
        "transfer_token": {
          "type": "string"
        },
        "url": {
          "format": "uri",
          "type": "string"
        }
      },
      "required": [
        "url",
        "method",
        "transfer_token",
        "expires_in_seconds",
        "instructions"
      ],
      "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.
