Skip to main content
Glama

Start a file upload

create_upload_url

Start an upload for a file this server does not hold, and get back a URL to send the bytes to. Two steps are needed: PUT the bytes to the returned URL with exactly the headers it gives you, then call complete_upload with the id it returns. The link does not work until both have happened. The upload URL is valid for five minutes. If it lapses before the bytes land, call this again for a fresh one rather than reusing the id. size_bytes has to be the exact number of bytes you are about to upload, because it is signed into the URL and storage refuses a body of any other length. Use share_text instead when you already hold the text and want it published in a single call.

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": {
      "filename": "<filename>",
      "content_type": "<content_type>",
      "size_bytes": "<size_bytes>"
    },
    "name": "create_upload_url"
  }
}

Input Schema

NameRequiredDescriptionDefault
filenameYesThe name to store the file under, including its extension. Up to 200 characters.
size_bytesYesThe exact number of bytes you are about to upload, as a whole number. This is signed into the upload URL, so a PUT whose body is even one byte longer or shorter is refused by storage. Measure the file rather than estimating.
content_typeYesThe MIME type of the bytes you are about to upload, such as application/pdf or image/png. Send this exact value as the Content-Type header on the PUT. Storage does not check it, so nothing will refuse a PUT that sends a different one. The type the link serves under is decided when the upload completes, from the first bytes of the file weighed against this value and the filename. A recognised file signature, such as a PDF or PNG header, wins over this value. HTML is kept as HTML only when this value is text/html. An image, PDF, HTML or ZIP type with no matching signature is stored as application/octet-stream. Otherwise this value stands, so send the true type.
desired_slugNoOptional. A preferred short name for the public link. It is cleaned up and checked on the server, and one that is taken or unusable is replaced with a random one rather than failing the call. The reply always names the slug that was actually assigned.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / content_type / description
      Previous value: -"The MIME type of the bytes you are about to upload, such as application/pdf or image/png. Send this exact value as the Content-Type header on the PUT. Storage does not check it, so nothing will refuse a PUT that sends a different one. Send it anyway. This value is stored as the file's type and decides how the link serves the file, and a file stored as something its bytes are not is served wrongly."New value: +"The MIME type of the bytes you are about to upload, such as application/pdf or image/png. Send this exact value as the Content-Type header on the PUT. Storage does not check it, so nothing will refuse a PUT that sends a different one. The type the link serves under is decided when the upload completes, from the first bytes of the file weighed against this value and the filename. A recognised file signature, such as a PDF or PNG header, wins over this value. HTML is kept as HTML only when this value is text/html. An image, PDF, HTML or ZIP type with no matching signature is stored as application/octet-stream. Otherwise this value stands, so send the true type."
  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 flag it as non-read-only and open-world; the description adds the details that actually drive correct invocation: a five-minute URL lifetime, the link being dead until both steps complete, re-issue on lapse, and the fact that size_bytes is signed so storage rejects any other body length. That is materially beyond what the annotations convey.

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 core action, then the sequencing, then the constraint, then the alternative — a logical order with no filler. Every sentence carries a constraint or a next step an agent needs.

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?

For a multi-step upload handshake with no output schema, the description supplies the whole contract: what is returned, what is done with it, its expiry, and the completion call. Nothing an agent needs to invoke it successfully 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 the baseline is 3, but the description adds operational meaning — exact byte count because it is signed into the URL, and 'with exactly the headers it gives you' tying content_type to the PUT. desired_slug is left entirely to the schema, which is fine given that schema's detail.

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 an upload for a file this server does not hold, and get back a URL to send the bytes to' — and immediately scopes it against the sibling share_text. An agent can distinguish it from complete_upload and share_text without opening any schema.

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 two-step protocol (PUT the bytes, then call complete_upload with the returned id) plus the explicit alternative: 'Use share_text instead when you already hold the text and want it published in a single call.' It also tells the agent what to do when the link lapses (call this again rather than reuse the id).

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.