Skip to main content
Glama

Documents Upload File

documents.upload_file

Uploads 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

NameRequiredDescriptionDefault
fileYesChatGPT attachment reference produced by the file picker; it cannot be a local path.
tableSlugNoSlug of a table to extract into directly. Omit to let project routing rules or an active splitter choose the destination.
project_slugNoSlug 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

NameRequiredDescriptionDefault
jobYesExtraction job created for a direct upload, or null for automatic routing or when job creation failed.
fileIdYesLegacy alias of file_id.
statusYesUpload status; queued once an extraction job was created.
file_idYesFile ID of the saved document. Identifies it in document lookups and in documentKeys when starting extraction.
uploadIdYesUpload ID.
job_errorNoWhy the extraction job could not be created for a direct upload; the document is still saved.
document_idYesNumeric document ID, needed to run a page-range splitter; null when not yet assigned.
next_actionYesSuggested follow-up call for tracking this document.
routing_modeYesdirect when tableSlug was given; automatic when project routing rules or an active splitter decide the destination.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed18 schema fields changed
    • addedInput schema / properties / file / description
      Added value: +"ChatGPT attachment reference produced by the file picker; it cannot be a local path."
    • addedInput schema / properties / file / properties / download_url / description
      Added value: +"Signed download address of the selected attachment, supplied by the ChatGPT file picker. It must point to an approved file host and is fetched once without forwarding credentials."
    • addedInput schema / properties / file / properties / file_id / description
      Added value: +"Attachment ID supplied by the ChatGPT file picker alongside download_url."
    • addedInput schema / properties / file / properties / file_name / description
      Added value: +"Original attachment file name, saved as the document name. Defaults to document.pdf when omitted."
    • addedInput schema / properties / file / properties / mime_type / description
      Added value: +"Attachment media type from the file picker. When present it must be application/pdf."
    • changedInput schema / properties / project_slug / description
      Previous value: -"Slug of an owned project. Optional only when the account has exactly one visible project; required for accounts with multiple visible projects."New value: +"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."
    • addedInput schema / properties / tableSlug / description
      Added value: +"Slug of a table to extract into directly. Omit to let project routing rules or an active splitter choose the destination."
    • addedOutput schema / properties / document_id / description
      Added value: +"Numeric document ID, needed to run a page-range splitter; null when not yet assigned."
    • addedOutput schema / properties / fileId / description
      Added value: +"Legacy alias of file_id."
    • addedOutput schema / properties / file_id / description
      Added value: +"File ID of the saved document. Identifies it in document lookups and in documentKeys when starting extraction."
    • addedOutput schema / properties / job / description
      Added value: +"Extraction job created for a direct upload, or null for automatic routing or when job creation failed."
    • addedOutput schema / properties / job_error / description
      Added value: +"Why the extraction job could not be created for a direct upload; the document is still saved."
    • addedOutput schema / properties / next_action / description
      Added value: +"Suggested follow-up call for tracking this document."
    • addedOutput schema / properties / next_action / properties / arguments / description
      Added value: +"Arguments to pass to that tool."
    • addedOutput schema / properties / next_action / properties / tool / description
      Added value: +"Name of the tool suggested for the next step."
    • addedOutput schema / properties / routing_mode / description
      Added value: +"direct when tableSlug was given; automatic when project routing rules or an active splitter decide the destination."
    • addedOutput schema / properties / status / description
      Added value: +"Upload status; queued once an extraction job was created."
    • addedOutput schema / properties / uploadId / description
      Added value: +"Upload ID."
  2. Changed1 schema field changed
    • addedInput schema / properties / project_slug / description
      Added value: +"Slug of an owned project. Optional only when the account has exactly one visible project; required for accounts with multiple visible projects."
  3. First observed

TDQS

A4.5/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Beyond the annotations, the description discloses important behavior: the download URL is fetched once without forwarding credentials, oversized files above 8 MiB are rejected, tableSlug triggers an immediate extraction job, and the result can be job or job_error. These details materially improve transparency for a write operation. It still does not mention authentication requirements, rate limits, or the consequences of retrying an upload, which keeps it short of a 5.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is five sentences, front-loaded with the purpose and followed by the two routing branches, return behavior, and size limit. Each sentence carries distinct operational information, and there is no redundant setup or filler.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the nested schema, 100% schema description coverage, annotations, and an output schema, the description supplies the remaining context needed for correct invocation: approved host restriction, PDF-only attachment, maximum file size, project default behavior, and tableSlug versus automatic routing. It is complete enough that an agent can use it safely without additional documentation.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the schema already documents the file object, project_slug defaults, and tableSlug routing. The description adds parameter-relevant meaning that the schema lacks: with tableSlug an extraction job is attempted immediately and the response distinguishes job from job_error, while omitting tableSlug invokes routing rules or an active splitter. That is a useful behavioral consequence, though much of the parameter detail remains schema-driven.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description gives a specific verb and resource: uploading and saving a user-selected ChatGPT PDF attachment. It narrows the scope to an approved HTTPS file host and an 8 MiB limit, which distinguishes it from a generic upload tool. An agent can tell what this tool does without opening the schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description gives clear context for use: the file must be a user-selected ChatGPT PDF attachment from an approved HTTPS host. It also explains the two operational paths through tableSlug versus automatic routing rules or an active splitter. However, it never names or explicitly contrasts with sibling alternatives such as documents.upload, and it states no when-not-to-use conditions.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.