Skip to main content
Glama

Request File Upload

file.request_upload

Start a file upload. Returns a presigned URL — you must then PUT exactly size_bytes bytes of the file to that URL yourself, with Content-Type set to the mime you gave (upload_headers), and finally call file.confirm_upload with the returned key. Images (image/png, image/jpeg, image/webp), a PDF (application/pdf, private only — e.g. a LinkedIn document post) or an MP4 (video/mp4, private only — e.g. a social video), max 10MB. Use visibility: "public" for anything that must load on a website.

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": {
      "mime": "<mime>",
      "size_bytes": "<size_bytes>"
    },
    "name": "file.request_upload"
  }
}

Input Schema

NameRequiredDescriptionDefault
mimeYesContent type of the file. One of: image/png, image/jpeg, image/webp, application/pdf (private only), video/mp4 (private only).
size_bytesYesExact byte length of the file you will upload. The URL is signed for it: a PUT of any other length fails.
visibilityNo`public` is world-readable — use it for blog covers and other web assets.private

Output Schema

NameRequiredDescriptionDefault
keyYesPass to file.confirm_upload once the PUT succeeded
upload_urlYesPresigned URL to PUT the bytes to
upload_headersYesHeaders the PUT must send exactly; the URL is signed for this Content-Type
expires_in_secondsYesLifetime of the upload URL

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / size_bytes / description
      Previous value: -"Exact byte length of the file you will upload."New value: +"Exact byte length of the file you will upload. The URL is signed for it: a PUT of any other length fails."
  2. Changed1 schema field changed
    • changedInput schema / properties / mime / description
      Previous value: -"Content type of the file. One of: image/png, image/jpeg, image/webp."New value: +"Content type of the file. One of: image/png, image/jpeg, image/webp, application/pdf (private only), video/mp4 (private only)."
  3. Changed2 schema fields changed
    • addedOutput schema / properties / upload_headers
      Added value: +{
      +  "additionalProperties": {
      +    "type": "string"
      +  },
      +  "description": "Headers the PUT must send exactly; the URL is signed for this Content-Type",
      +  "propertyNames": {
      +    "type": "string"
      +  },
      +  "type": "object"
      +}
    • changedOutput schema / required
      Previous value: -[
      -  "upload_url",
      -  "key",
      -  "expires_in_seconds"
      -]New value: +[
      +  "upload_url",
      +  "upload_headers",
      +  "key",
      +  "expires_in_seconds"
      +]
  4. First observed

TDQS

A4.1/5.0
Behavior4/5

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

Annotations only declare readOnlyHint=false, idempotentHint=false, openWorldHint=true and destructiveHint=false. The description adds real behavioral context beyond that: the upload is not completed by this call, the agent must perform the PUT itself with a matching Content-Type header, byte length must match exactly, and PDF/MP4 are private-only. Missing are URL expiry, rate limits, or failure/retry behavior.

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?

The core action and the mandatory follow-up are front-loaded in the first sentence, with constraints and visibility guidance after. Dense but nearly every clause carries information; the parenthetical examples for PDF/MP4 add slight bulk without much decision value.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a three-parameter tool with an output schema already covering return values, the description supplies the essential protocol, allowed types, size ceiling, and visibility semantics. The only meaningful gap is the lifetime of the presigned URL and what to do if the PUT fails, which matter for a multi-step upload.

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 mime, size_bytes, and visibility are already fully documented in the schema, including the exact-length signing constraint and the public-is-world-readable meaning. The description largely restates those constraints rather than adding new semantics, and its reference to `upload_headers` is not an actual input parameter, which could momentarily confuse. Baseline 3 is appropriate.

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 ('Start a file upload') and immediately describes the two-step protocol it initiates, returning a presigned URL. The scope is unambiguous and distinguishable from sibling file.confirm_upload, which it names as the follow-up.

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?

Explicitly prescribes the workflow: PUT the exact bytes to the returned URL, then call file.confirm_upload with the returned key. It also gives selection guidance for visibility ('public' for anything that must load on a website) and constrains accepted types. It does not state when to avoid this tool, but the type/size constraints effectively bound its use.

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