Skip to main content
Glama

Get Upload Url

get_upload_url

Get a temporary upload URL for a local image, video or audio file.

Requesting a URL does not upload the file. Request a new URL if it expires.

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": {
      "file_name": "<file_name>",
      "size_bytes": "<size_bytes>"
    },
    "name": "get_upload_url"
  }
}

Input Schema

NameRequiredDescriptionDefault
file_nameYesLocal file basename with its image, video or audio extension.
size_bytesYesExact file size in bytes.

Output Schema

NameRequiredDescriptionDefault
methodNoHTTP method for uploading raw bytes, without multipart encoding.PUT
headersYesUse exactly these headers for the upload request.
file_urlYesMedia reference URL to use after a successful upload.
expires_inYesMaximum upload URL lifetime in seconds; not file retention.
upload_urlYesTemporary upload endpoint. Send raw file bytes using method and headers; never fetch or preview this URL.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed7 schema fields changed
    • addedInput schema / properties / file_name / description
      Added value: +"Local file basename with its image, video or audio extension."
    • addedInput schema / properties / size_bytes / description
      Added value: +"Exact file size in bytes."
    • addedOutput schema / properties / expires_in / description
      Added value: +"Maximum upload URL lifetime in seconds; not file retention."
    • addedOutput schema / properties / file_url / description
      Added value: +"Media reference URL to use after a successful upload."
    • addedOutput schema / properties / headers / description
      Added value: +"Use exactly these headers for the upload request."
    • addedOutput schema / properties / method / description
      Added value: +"HTTP method for uploading raw bytes, without multipart encoding."
    • addedOutput schema / properties / upload_url / description
      Added value: +"Temporary upload endpoint. Send raw file bytes using method and headers; never fetch or preview this URL."
  2. First observed

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=false, openWorldHint=true, and idempotentHint=false, so the safety profile is partly covered. The description adds useful behavioral context: requesting a URL does not upload the file, URLs are temporary, and an expired URL must be replaced. It omits expiry duration, auth needs, and rate limits, so it is not fully exhaustive.

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?

The description is three short sentences and front-loads the core action. Each subsequent sentence adds a useful behavioral caveat without waste.

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 simple two-parameter tool with annotations and an output schema, the description covers the essential purpose and key caveats. It does not explain how the returned URL should be used, but that is reasonably delegated to the output schema and related task tools.

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 clear schema descriptions for file_name and size_bytes. The description adds no parameter-specific syntax, constraints, or meaning beyond what the schema already provides, so the baseline 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb, resource, and accepted file types: get a temporary upload URL for local image, video, or audio files. It is clear on its own, but it does not explicitly distinguish itself from the many submit_* siblings that likely consume the returned URL.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage before an upload and says to request a new URL if it expires, which is helpful. However, it does not explicitly say when to use this versus submit_* tools or name any alternative.

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