Skip to main content
Glama

prepare-document-upload

Step 1 of document upload. Call before uploading bytes. Returns a presigned POST target with form fields and uploadToken; submit the returned form fields, include Content-MD5/checksum fields exactly when present, append the file last, then call complete-document-upload. Never send contentBase64, arbitrary upload headers, or file bytes to MCP.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
checksumYes32-character MD5 hex digest
filenameYesOriginal filename, including extension
companyIdYesCompany ID
sizeBytesYesFile size in bytes, max 50 MB
contentTypeYesMIME type for the file

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.7/5.0
Behavior5/5

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

Annotations only declare a non-read-only, non-destructive, closed-world mutation. The description goes well beyond that: it discloses the return shape (presigned POST target with fields and uploadToken), the exact submission mechanics (include Content-MD5/checksum fields when present, append the file last), and forbidden inputs. This is rich behavioral context the annotations do not carry.

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 workflow role, then the return value, then the mechanics, then the prohibitions. Every clause carries actionable content with no filler, despite covering a multi-step flow.

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?

There is no output schema, but the description compensates by explaining what the call returns (presigned target, form fields, uploadToken) and how to use it before the complete step. For a two-phase upload protocol, nothing an agent needs to call it correctly is missing.

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%, with checksum pattern, sizeBytes maximum, and per-field descriptions already documented, so the baseline is 3. The description mentions checksum/Content-MD5 handling but for the form submission rather than adding meaning to the input parameters themselves.

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 within a named workflow ('Step 1 of document upload') and precisely what it produces ('a presigned POST target with form fields and uploadToken'). It also distinguishes itself from the sibling complete-document-upload by positioning itself as the prerequisite step.

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 when-to-call ('Call before uploading bytes'), the follow-up action ('then call complete-document-upload'), and clear negative guidance ('Never send contentBase64, arbitrary upload headers, or file bytes to MCP'). An agent knows exactly where this sits in the sequence and what not to do.

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