# Prepare client intake autofill

`client_intake_applications.prepare_autofill`

Update one Client Intake Application's autofill notes or inference mode without starting inference. Read preparation first and pass its latest revision; stale revisions conflict. For supporting documents, use client_intake_applications.prepare_autofill_file_upload, then read preparation again. Follow the returned file and revision requirements.

[Intake applications guide](https://docs.levr.ai/mcp/resources/client_intake_applications.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": {
    "ai_mode": {
      "enum": [
        "fast",
        "thinking"
      ],
      "type": "string"
    },
    "application_id": {
      "description": "Copy client_intake_application.id from businesses.get; not the Business ID. Prefix: ciappl_.",
      "maxLength": 255,
      "minLength": 1,
      "type": "string"
    },
    "expected_preparation_revision": {
      "description": "Copy revision from client_intake_applications.get_autofill_preparation; refresh after preparation changes.",
      "minimum": 1,
      "type": "integer"
    },
    "provider_slug": {
      "description": "Copy provider_slug from providers.list; named slugs are valid.",
      "maxLength": 255,
      "minLength": 1,
      "type": "string"
    },
    "text_input": {
      "description": "Replace preparation notes; empty string clears them, omission preserves them. Use the returned preparation revision before starting.",
      "type": "string"
    }
  },
  "required": [
    "provider_slug",
    "application_id",
    "expected_preparation_revision"
  ],
  "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": {
        "ai_mode": {
          "enum": [
            "fast",
            "thinking"
          ],
          "type": "string"
        },
        "application_id": {
          "description": "Stable public identifier for the referenced resource.",
          "maxLength": 255,
          "minLength": 1,
          "type": "string"
        },
        "can_start": {
          "type": "boolean"
        },
        "evidence_sources": {
          "items": {
            "additionalProperties": false,
            "properties": {
              "family": {
                "type": "string"
              },
              "id": {
                "description": "Stable public identifier for the referenced resource.",
                "maxLength": 255,
                "minLength": 1,
                "type": "string"
              },
              "label": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "secondary_label": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "selected_by_default": {
                "type": "boolean"
              }
            },
            "required": [
              "id",
              "family",
              "label",
              "secondary_label",
              "selected_by_default"
            ],
            "type": "object"
          },
          "type": "array"
        },
        "file_count": {
          "minimum": 0,
          "type": "integer"
        },
        "files": {
          "description": "Supporting documents in preparation order, with their current processing status.",
          "items": {
            "additionalProperties": false,
            "properties": {
              "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"
        },
        "revision": {
          "minimum": 1,
          "type": "integer"
        },
        "selected_evidence_source_count": {
          "minimum": 0,
          "type": "integer"
        },
        "text_input": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "required": [
        "application_id",
        "revision",
        "text_input",
        "ai_mode",
        "file_count",
        "files",
        "selected_evidence_source_count",
        "evidence_sources",
        "can_start"
      ],
      "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.
