Documents Upload File
documents.upload_fileUploads and saves a user-selected ChatGPT PDF attachment from an approved HTTPS file host. With tableSlug, attempts to create an extraction job immediately, returning job on success or job_error on failure. Without tableSlug, automatic processing uses project routing rules or an active splitter. Returns document identifiers and processing details. Maximum file size: 8 MiB.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"file": "<file>"
},
"name": "documents.upload_file"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file | Yes | ChatGPT attachment reference produced by the file picker; it cannot be a local path. | |
| tableSlug | No | Slug of a table to extract into directly. Omit to let project routing rules or an active splitter choose the destination. | |
| project_slug | No | Slug of the owned project to act on, as listed with the account's projects. When omitted, the account's single visible project is selected; omitting it fails if the account has several projects. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| job | Yes | Extraction job created for a direct upload, or null for automatic routing or when job creation failed. | |
| fileId | Yes | Legacy alias of file_id. | |
| status | Yes | Upload status; queued once an extraction job was created. | |
| file_id | Yes | File ID of the saved document. Identifies it in document lookups and in documentKeys when starting extraction. | |
| uploadId | Yes | Upload ID. | |
| job_error | No | Why the extraction job could not be created for a direct upload; the document is still saved. | |
| document_id | Yes | Numeric document ID, needed to run a page-range splitter; null when not yet assigned. | |
| next_action | Yes | Suggested follow-up call for tracking this document. | |
| routing_mode | Yes | direct when tableSlug was given; automatic when project routing rules or an active splitter decide the destination. |