> ## Documentation Index
> Fetch the complete documentation index at: https://docs.capout.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Process PDFs

> Use capout_process_pdf to send one PDF into the CapOut export workflow.

`capout_process_pdf` is the primary MCP tool for single-document processing.

## Required arguments

* Always send `xn_address`
* Always send `profile_code`: `5L` for Carrier or `8D` for Contractor
* Send exactly one of:
  * `pdf`
  * `url`
  * `file_base64`
  * `file_path`
* When using `file_base64`, also send `file_name`

When using `file_base64`, keep the PDF at or below `50 MiB`.

For local or workspace PDFs on a hosted MCP, use [Staged Uploads](/mcp/tools/staged-uploads), which supports PDFs up to `50 MiB`.

For the public CapOut MCP, the practical inputs are `pdf`, `url`, and `file_base64`. The MCP is hosted remotely and cannot read your local machine paths directly.

## Use the right source type

* Use `pdf` for ChatGPT-style file attachments that include `download_url` and `file_id`
* Use `url` for a public `https://` PDF URL
* Use `file_base64` when the client has bytes but not a URL and the inline payload stays within the `50 MiB` limit
* Use `file_path` only for a path that already exists on the CapOut MCP server itself. Do not send your local `/Users/...` or workspace path here.

CapOut MCP is hosted remotely and cannot read your local filesystem. For local workspace PDFs, use [Staged Uploads](/mcp/tools/staged-uploads).

## Example: attached PDF

```json theme={null}
{
  "tool": "capout_process_pdf",
  "arguments": {
    "pdf": {
      "download_url": "https://files.chatgpt.com/file-123",
      "file_id": "file-123"
    },
    "xn_address": "matt@capout.prod",
    "profile_code": "5L"
  }
}
```

## Example: HTTPS PDF URL

```json theme={null}
{
  "tool": "capout_process_pdf",
  "arguments": {
    "url": "https://example.com/claims/123/estimate.pdf",
    "xn_address": "matt@capout.prod",
    "profile_code": "5L"
  }
}
```

## Example: inline base64

```json theme={null}
{
  "tool": "capout_process_pdf",
  "arguments": {
    "file_base64": "JVBERi0xLjQKJ...",
    "file_name": "claim-123-estimate.pdf",
    "xn_address": "matt@capout.prod",
    "profile_code": "8D"
  }
}
```

## Successful response

The MCP intentionally returns only the handoff needed for the next step:

```json theme={null}
{
  "document_id": "b9cf4ef8-9fa3-441b-b0d3-990bee7fbcce",
  "message": "CapOut accepted the document for background processing. Keep polling with capout_wait_for_document or capout_document_status until terminal is true."
}
```

## What to do next

After the document is accepted, keep polling until the export reaches a terminal state:

* [capout\_document\_status](/mcp/tools/status-and-waiting)
* [capout\_wait\_for\_document](/mcp/tools/status-and-waiting)
