Skip to main content
Glama

Request File Upload

file.request_upload

Start a file upload. Returns a presigned URL — you must then PUT the file's bytes 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.

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.
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 / 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)."
  2. 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"
      +]
  3. First observed

TDQS

A4.4/5.0
Behavior4/5

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

Annotations only declare the safety profile (not read-only, non-destructive, non-idempotent); the description carries real behavioral weight by disclosing the two-phase presigned-URL protocol, the required `Content-Type` header on the PUT, the 10MB cap, and the visibility consequence. Two gaps remain: it references an `upload_headers` field that does not exist in the input schema, and it never mentions presigned URL expiry, which matters for a URL the caller must consume promptly.

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-loaded with the action and the critical 'you must PUT the bytes yourself' caveat, then constraints, then the visibility rule. The second sentence is long and packs several instructions, but every clause is load-bearing; no filler sentences.

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?

An output schema exists, so return values need not be documented, yet the description still explains that a key comes back and feeds into `file.confirm_upload`. Combined with the type/size limits and visibility semantics, an agent has everything needed to execute the multi-step flow correctly.

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 the baseline is 3, but the description adds genuine meaning on top: it supplies the 10MB limit that the schema's `size_bytes` maximum (MAX_SAFE_INTEGER) does not encode, and it clarifies that `visibility: "public"` means 'world-readable ... must load on a website'. The `mime` parameter gains use-case framing beyond the schema's enumeration.

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 then spells out the full multi-step contract: returns a presigned URL, the caller PUTs bytes to it, then calls `file.confirm_upload`. This makes it unambiguously distinct from its closest sibling, `file.confirm_upload`, without opening either 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 routing guidance: which mime types are allowed, that PDF and MP4 are private-only with example use cases (LinkedIn document post, social video), and 'Use `visibility: "public"` for anything that must load on a website'. It does not state when NOT to use this tool (e.g. reusing an existing file or an alternative upload path), which keeps it short of a 5.

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