Skip to main content
Glama

Upload a project file

upload_file
Destructive

Upload a new file or an explicitly approved binary replacement. For new editable UTF-8 text use content (legacy contentBase64 is text-only); existing text must use edit_file. Binary files up to 30 MiB use an out-of-band transfer or a host-provided attachment. No automatic source editing or compilation. For a binary file, use upload_file with transfer: direct and its exact sizeBytes, then send the original bytes by HTTP POST to upload.url with the returned headers. Never send multipart, JSON, Base64, or binary contents through MCP. An existing path returns confirmation_required without changing files. Name the project and file, explain that the previous binary is not recoverable through PaperDock history, and ask for explicit user approval. Only after approval repeat the same transfer with overwrite: true, expectedRevision and replacementTarget exactly as returned. These fields describe agent-reported consent and target preconditions, not server-verified human approval. If the target changed, stop and ask again; never silently refresh the revision or choose another path. Existing text must use edit_file and its Review changes flow. awaiting_upload is not success; only created or replaced confirms completion. After an uncertain transfer, check the same path and uploadId, at most twice before reporting pending. Do not create duplicate uploads. On MCP_UPLOAD_LIMIT, explain the specific limit and retryAt (UTC), do not repeatedly prepare new sessions while waiting, and offer webUploadUrl for direct upload in the PaperDock web app; these MCP session limits do not apply to web uploads. For ChatGPT attachments use the host-provided file object; never invent URLs or IDs. If file access or network policy blocks transfer, follow normal approvals or offer webUploadUrl (transfer: web); never bypass restrictions. Never expose upload authorization headers in replies or logs.

Input Schema

NameRequiredDescriptionDefault
fileNo
pathYes
sha256No
contentNo
mimeTypeNo
transferNodirect prepares raw HTTP upload and requires sizeBytes; web returns a file picker link when automatic transfer is unavailable.
uploadIdNoCheck a previous upload after an uncertain transfer; do not start another transfer before checking.
overwriteNoSet true only after explicit user approval of the named existing binary and the loss of its prior version. Requires the returned expectedRevision and replacementTarget.
projectIdYes
sizeBytesNo
contentBase64No
expectedRevisionNoThe revision returned with confirmation_required; never refresh automatically after a conflict.
replacementTargetNoOpaque target precondition returned with confirmation_required; not proof of human consent.

Output Schema

NameRequiredDescriptionDefault
fileNo
statusYes
uploadNo
messageNo
uploadIdNo
webUploadUrlNo
expectedRevisionNo
replacementTargetNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / sizeBytes / maximum
      Previous value: -26214400New value: +31457280
  2. Changed17 schema fields changed
    • changedInput schema / oneOf
      Previous value: -[
      -  {
      -    "required": [
      -      "content"
      -    ]
      -  },
      -  {
      -    "required": [
      -      "contentBase64"
      -    ]
      -  }
      -]New value: +[
      +  {
      +    "required": [
      +      "content"
      +    ]
      +  },
      +  {
      +    "required": [
      +      "contentBase64"
      +    ]
      +  },
      +  {
      +    "required": [
      +      "transfer"
      +    ]
      +  },
      +  {
      +    "required": [
      +      "file"
      +    ]
      +  },
      +  {
      +    "required": [
      +      "uploadId"
      +    ]
      +  }
      +]
    • addedInput schema / properties / expectedRevision
      Added value: +{
      +  "description": "The revision returned with confirmation_required; never refresh automatically after a conflict.",
      +  "minimum": 0,
      +  "type": "integer"
      +}
    • addedInput schema / properties / file
      Added value: +{
      +  "additionalProperties": false,
      +  "properties": {
      +    "download_url": {
      +      "type": "string"
      +    },
      +    "file_id": {
      +      "type": "string"
      +    },
      +    "file_name": {
      +      "type": "string"
      +    },
      +    "mime_type": {
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "download_url",
      +    "file_id"
      +  ],
      +  "type": "object"
      +}
    • addedInput schema / properties / overwrite
      Added value: +{
      +  "description": "Set true only after explicit user approval of the named existing binary and the loss of its prior version. Requires the returned expectedRevision and replacementTarget.",
      +  "type": "boolean"
      +}
    • addedInput schema / properties / replacementTarget
      Added value: +{
      +  "description": "Opaque target precondition returned with confirmation_required; not proof of human consent.",
      +  "pattern": "^[a-f0-9]{64}$",
      +  "type": "string"
      +}
    • addedInput schema / properties / sizeBytes
      Added value: +{
      +  "maximum": 26214400,
      +  "minimum": 1,
      +  "type": "integer"
      +}
    • addedInput schema / properties / transfer
      Added value: +{
      +  "description": "direct prepares raw HTTP upload and requires sizeBytes; web returns a file picker link when automatic transfer is unavailable.",
      +  "enum": [
      +    "direct",
      +    "web"
      +  ],
      +  "type": "string"
      +}
    • addedInput schema / properties / uploadId
      Added value: +{
      +  "description": "Check a previous upload after an uncertain transfer; do not start another transfer before checking.",
      +  "format": "uuid",
      +  "type": "string"
      +}
    • addedOutput schema / properties / expectedRevision
      Added value: +{
      +  "type": "integer"
      +}
    • addedOutput schema / properties / message
      Added value: +{
      +  "type": "string"
      +}
    • addedOutput schema / properties / replacementTarget
      Added value: +{
      +  "type": "string"
      +}
    • removedOutput schema / properties / status / const
      Removed value: -"created"
    • addedOutput schema / properties / status / enum
      Added value: +[
      +  "created",
      +  "replaced",
      +  "confirmation_required",
      +  "awaiting_upload",
      +  "manual_upload_required",
      +  "uploading",
      +  "failed",
      +  "expired"
      +]
    • addedOutput schema / properties / upload
      Added value: +{
      +  "additionalProperties": false,
      +  "properties": {
      +    "expiresInSeconds": {
      +      "type": "integer"
      +    },
      +    "headers": {
      +      "additionalProperties": false,
      +      "properties": {
      +        "Authorization": {
      +          "type": "string"
      +        },
      +        "Content-Type": {
      +          "const": "application/octet-stream",
      +          "type": "string"
      +        }
      +      },
      +      "required": [
      +        "Authorization",
      +        "Content-Type"
      +      ],
      +      "type": "object"
      +    },
      +    "method": {
      +      "const": "POST",
      +      "type": "string"
      +    },
      +    "url": {
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "url",
      +    "method",
      +    "headers",
      +    "expiresInSeconds"
      +  ],
      +  "type": "object"
      +}
    • addedOutput schema / properties / uploadId
      Added value: +{
      +  "type": "string"
      +}
    • addedOutput schema / properties / webUploadUrl
      Added value: +{
      +  "type": "string"
      +}
    • changedOutput schema / required
      Previous value: -[
      -  "file",
      -  "status"
      -]New value: +[
      +  "status"
      +]
  3. First observed

TDQS

A4.5/5.0
Behavior4/5

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

Well beyond the annotations, it discloses that an existing path returns confirmation_required without writing, that the prior binary is unrecoverable through PaperDock history, that awaiting_upload is not success and only created/replaced confirms, that MCP_UPLOAD_LIMIT carries a retryAt and must not be retried by preparing new sessions, and that upload auth headers must never be exposed. It even pre-empts a misreading of its own safety fields by stating expectedRevision/replacementTarget are agent-reported consent, not server-verified human approval. Slight gap: the 30 MiB ceiling and sha256/mimeType behavior are only partly described.

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

Conciseness3/5

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

Front-loaded correctly with the mode-selection rules, but the body is a dense ~300-word wall that repeats the 'existing text must use edit_file' rule in two places and folds transfer mechanics, approval etiquette, retry policy, and header hygiene into one undifferentiated paragraph block. Most sentences earn their place for a tool this complex, but the lack of structure (no separation of modes, approval flow, and error handling) makes it harder to scan than the content warrants.

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?

An output schema exists, yet the description still clarifies the outcome vocabulary (awaiting_upload vs created vs replaced) that an agent needs to judge success, plus the two-attempt verification cap and duplicate-upload prohibition. For a 13-parameter, destructive, open-world upload tool with nested objects and a oneOf, virtually every decision point an agent hits has guidance.

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 description coverage is only 38% across 13 parameters, so the description must carry weight and largely does: it explains that transfer: direct requires sizeBytes, that overwrite/expectedRevision/replacementTarget are only used after an approval round-trip and must never be refreshed on conflict, that uploadId is for post-uncertainty verification, and that contentBase64 is legacy and text-only. It adds no meaning for sha256, mimeType, or the nested file object fields (file_id, download_url, file_name), which remain undocumented in both places.

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?

Opens with a specific verb+resource and immediately splits the space: new editable UTF-8 text via content, legacy contentBase64 (text-only), binary via transfer, and existing text routed to edit_file. An agent can tell from the first two sentences which mode it is in and which sibling handles the case it must not handle.

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

Usage Guidelines5/5

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

Gives explicit selection rules across every input variant: content vs contentBase64 vs transfer: direct vs transfer: web vs file (host attachment) vs uploadId (checking an uncertain transfer). It also names when NOT to use it (existing text → edit_file and its Review changes flow) and offers webUploadUrl as the fallback when MCP limits or network policy block transfer.

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.

Resources