# Import Autofill document

`projects.import_matchmaking_autofill_file`

Import a host-provided original supporting document for Autofill in the Project matching application. Requires a host-supplied file reference and current preparation revision. Limit: 25 MiB. Saves the original without starting Autofill, changing answers or submitting. Returns attachment and preparation metadata. Identical retries use the same idempotency_key; uncertain outcomes require current preparation verification before another transfer. The application upload section remains available.

[Matchmaking guide](https://docs.levr.ai/mcp/resources/matchmaking.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.

## Provider portal input schema

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "additionalProperties": false,
  "properties": {
    "expected_preparation_revision": {
      "minimum": 1,
      "type": "integer"
    },
    "file": {
      "additionalProperties": false,
      "properties": {
        "download_url": {
          "description": "Temporary HTTPS file download URL supplied by the assistant host; keep it private.",
          "format": "uri",
          "maxLength": 8192,
          "minLength": 1,
          "type": "string"
        },
        "file_id": {
          "description": "Opaque file reference supplied by the host, not an application answer-file id.",
          "maxLength": 256,
          "minLength": 1,
          "type": "string"
        },
        "file_name": {
          "maxLength": 255,
          "minLength": 1,
          "type": "string"
        },
        "mime_type": {
          "maxLength": 255,
          "minLength": 1,
          "type": "string"
        }
      },
      "required": [
        "download_url",
        "file_id"
      ],
      "type": "object"
    },
    "idempotency_key": {
      "format": "uuid",
      "type": "string"
    },
    "provider_slug": {
      "description": "Copy provider_slug from providers.list; named slugs are valid.",
      "maxLength": 255,
      "minLength": 1,
      "type": "string"
    },
    "workspace_slug": {
      "description": "Matching workspace: copy workspace_slug (mmw_) from projects.get or projects.list; not project_slug.",
      "maxLength": 255,
      "minLength": 1,
      "type": "string"
    }
  },
  "required": [
    "provider_slug",
    "workspace_slug",
    "file",
    "expected_preparation_revision",
    "idempotency_key"
  ],
  "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": {
        "file_count": {
          "minimum": 0,
          "type": "integer"
        },
        "files": {
          "description": "Supporting documents in preparation order, with their current processing status.",
          "items": {
            "additionalProperties": false,
            "properties": {
              "id": {
                "description": "Opaque supporting-document handle for removal or extraction retry.",
                "pattern": "^afdoc_[0-9a-f]{64}$",
                "type": "string"
              },
              "name": {
                "description": "Document name shown in the Portal.",
                "example": "financial-statement.pdf",
                "type": [
                  "string",
                  "null"
                ]
              },
              "status": {
                "description": "Document processing: pending is queued; running is reading the file; success is ready for Autofill; failed needs attention.",
                "enum": [
                  "pending",
                  "running",
                  "success",
                  "failed"
                ],
                "type": "string"
              }
            },
            "required": [
              "name",
              "status"
            ],
            "type": "object"
          },
          "type": "array"
        },
        "resource": {
          "additionalProperties": false,
          "properties": {
            "id": {
              "description": "Stable public identifier for the referenced resource.",
              "maxLength": 255,
              "minLength": 1,
              "type": "string"
            },
            "object": {
              "type": "string"
            }
          },
          "required": [
            "id",
            "object"
          ],
          "type": "object"
        },
        "revision": {
          "minimum": 1,
          "type": "integer"
        },
        "uploaded_file": {
          "additionalProperties": false,
          "properties": {
            "id": {
              "description": "Opaque supporting-document handle for removal or extraction retry.",
              "pattern": "^afdoc_[0-9a-f]{64}$",
              "type": "string"
            },
            "name": {
              "description": "Document name shown in the Portal.",
              "example": "financial-statement.pdf",
              "type": [
                "string",
                "null"
              ]
            },
            "status": {
              "description": "Document processing: pending is queued; running is reading the file; success is ready for Autofill; failed needs attention.",
              "enum": [
                "pending",
                "running",
                "success",
                "failed"
              ],
              "type": "string"
            }
          },
          "required": [
            "name",
            "status"
          ],
          "type": "object"
        }
      },
      "required": [
        "resource",
        "revision",
        "file_count",
        "files",
        "uploaded_file"
      ],
      "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.
