Skip to main content
Glama

Create document

document_create

Reserve an upload for one document a request hands to its recipient through the form's Documents block. Returns { id, uploadUrl, expiresAt, name, contentType, size }. Bytes never pass through this tool: PUT the raw file to uploadUrl (one hour) with the declared Content-Type, then pass { "documentId": id } in request_create's documents, which verifies it. One upload serves any number of requests. See load_skill("requests").

Input Schema

NameRequiredDescriptionDefault
nameYesDisplay name the recipient sees.
sizeYesExact byte length. Max 26214400.
formIdYesForm whose Documents block will show it; scopes the upload to that workspace.
sha256NoHex digest, verified against the upload when given.
contentTypeYesMIME type of the bytes you will upload.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / contentType / enum
      Previous value: -[
      -  "application/pdf",
      -  "image/avif",
      -  "image/bmp",
      -  "image/gif",
      -  "image/jpeg",
      -  "image/png",
      -  "image/svg+xml",
      -  "image/tiff",
      -  "image/webp"
      -]New value: +[
      +  "application/pdf",
      +  "image/avif",
      +  "image/bmp",
      +  "image/gif",
      +  "image/jpeg",
      +  "image/png",
      +  "image/tiff",
      +  "image/webp"
      +]
  2. First observed

TDQS

A4.9/5.0
Behavior5/5

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

Annotations only declare it as a non-read-only, non-destructive, closed-world write. The description adds far more: bytes never pass through this tool, the upload URL expires in one hour, the Content-Type must match the declared value, and the upload is verified downstream by request_create. These are exactly the behavioral traits an agent cannot infer from the annotations.

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?

Front-loaded with the action and the return contract, followed by the byte-transfer workflow in one dense sentence. No filler; the closing load_skill pointer is the only non-essential clause but is useful routing.

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?

With no output schema, the description still enumerates the return fields ({ id, uploadUrl, expiresAt, name, contentType, size }) and the full follow-up workflow, including the downstream verification step. Nothing needed to call this tool correctly is missing.

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 baseline is 3. The description goes further by linking contentType to the subsequent PUT ('with the declared Content-Type') and implying formId scopes the upload. It doesn't clarify size/sha256 semantics beyond the schema, so it's above baseline but not exhaustive.

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 and resource: 'Reserve an upload for one document a request hands to its recipient through the form's Documents block.' This clearly separates it from siblings like editor_insertDocumentsBlock (which edits the form) and request_create (which consumes the document), so an agent can route without opening schemas.

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 the full ordering constraint explicitly: PUT the raw bytes to `uploadUrl`, then pass { documentId: id } in request_create's `documents`. It also names the condition that makes reuse safe ('one upload serves any number of requests') and points to load_skill("requests") for the higher-level flow.

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.