Skip to main content
Glama

upload_document_version

Upload a new file version to an existing document, making it the current version while earlier versions remain available. Use for corrected scans, signed copies, or unlocked PDFs.

Instructions

Add a new file version to an EXISTING document instead of creating a new document — e.g. a corrected scan, a signed copy, or an unlocked PDF. The new file becomes the current version: content, search and downloads follow it, and earlier versions stay listed in the document's versions (see get_document). Processing is asynchronous like post_document; set poll=true to wait. To strip a PDF password you don't need to re-upload: use edit_documents_bulk method remove_password with update_document=true.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesThe document to add the version to
fileYesBase64-encoded file content (the universal method — works for any deployment, since the bytes travel over the wire). Alternatively, an absolute file path (e.g. /tmp/invoice.pdf) that the server reads from its OWN filesystem — this only works when the server runs on the same machine as the file (local/stdio deployments). For a remote server, the path option will fail; use base64 instead.
pollNoWait for processing to finish (default false)
filenameYesFilename including extension, e.g. 'contract-signed.pdf'
version_labelNoShort label shown in the versions list, e.g. 'signed'
poll_timeout_secondsNoMax seconds to wait when poll=true (default 30)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv3.2.0

TDQS

A4.7/5.0
Behavior5/5

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

Discloses key behavioral traits beyond the annotations: the new version becomes current for content/search/downloads, earlier versions remain listed, and processing is asynchronous with a poll option. This meaningfully informs the agent about side effects and timing without contradicting the readOnly/destructive hints.

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?

Four sentences, each earning its place: purpose, behavioral consequence, asynchronous behavior, and an alternative for a related scenario. Information is front-loaded with the core purpose before details. No redundant phrasing or fluff.

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?

For a tool with 6 parameters, rich schema descriptions, and no output schema, the description covers the essential operational context: when to use it, what happens to the version hierarchy, how to handle async processing, and when to use an alternative. Nothing critical is missing for correct invocation.

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

Parameters3/5

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

Schema description coverage is 100%, so the schema already documents all six parameters. The description adds contextual framing (e.g., existing document, versions list) but does not need to repeat parameter details. Baseline of 3 is appropriate because the schema carries the parameter meaning.

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?

States a specific verb ('Add a new file version') and resource ('EXISTING document'), immediately distinguishing it from creating a new document. Concrete examples (corrected scan, signed copy, unlocked PDF) make the use case unmistakable. It clearly differentiates from sibling post_document.

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?

Explicitly says when to use this tool ('instead of creating a new document') and gives concrete example scenarios. It also provides a direct alternative for a related task ('use edit_documents_bulk method remove_password with update_document=true'), so an agent knows not to use this tool for that case.

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

Deploy Server

Other Tools