Skip to main content
Glama

Create document upload url

create_document_upload_url

Get a one-time signed URL to put a local file into the tenant's storage, plus the path it will live at. The bytes never pass through the agent: upload with curl -H "Content-Type: <mime>" -T <file> "<upload_url>" from the shell — without the header the bucket answers 415, then call finalize_document_upload with the returned path. base64 through a tool call costs about 55.600 tokens for one screenshot and twice that for a scanned certificate, for content the agent never reads. The URL is valid for two hours and for exactly one path. Nothing is written to any record until you finalize — an abandoned upload leaves the target untouched.

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": {
      "entity": "<entity>",
      "entity_id": "<entity_id>",
      "file_name": "<file_name>"
    },
    "name": "create_document_upload_url"
  }
}

Input Schema

NameRequiredDescriptionDefault
entityYesWhat the file belongs to. personnel means the person's CV file (cv_file_url); personnel_credential a degree or certificate.
entity_idYes
file_nameYesName as it should be kept, e.g. "Yuxiang He.pdf". Path separators are stripped.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.4/5.0
Behavior5/5

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

Goes well beyond the annotations: URL lifetime (two hours), single-path scope, the 415 failure mode when the MIME header is missing, and the key safety property that nothing is written to any record until finalize, so an abandoned upload leaves the target untouched. This directly reinforces and elaborates the non-destructive, non-idempotent annotation profile.

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

Conciseness4/5

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

Front-loads the purpose in the first sentence, then packs invocation, cost rationale, and lifetime constraints into a tight paragraph with no filler. The token-cost justification is longer than strictly necessary but is doing real work in steering the agent away from base64 uploads.

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, and the description compensates by describing both return values (signed URL and destination path). Combined with the lifetime, error-mode, and finalize-workflow details, an agent has everything needed to call it correctly.

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 coverage is 67% and the schema already documents entity (with enum meanings), entity_id, and file_name (including path-separator stripping). The description adds no further per-parameter meaning such as file size limits or accepted MIME types, so the baseline of 3 for a well-covered schema applies.

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 — getting a one-time signed URL that places a local file into the tenant's storage — and explicitly says it returns the destination path. It also names the follow-up tool (finalize_document_upload), so the agent can distinguish this step from the finalize step without opening a 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?

Gives concrete invocation guidance (upload via curl -T from the shell with a Content-Type header, not via base64 in a tool call) and states the required next step, finalize_document_upload with the returned path. It does not explicitly say when to prefer the sibling create_dossier_image_upload_url / create_dossier_media_upload_url tools, though the entity enum largely resolves that.

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