Skip to main content
Glama

Start media upload

create_media_upload

Reserve a presigned upload URL for a direct browser upload (used by the composer UI). For scripted uploads use upload_media instead. Use this when you need a presigned URL for a large direct upload (advanced; prefer upload_media for normal files).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sizeBytesYesFile size in bytes.
contentTypeYesFile MIME type, e.g. image/png or video/mp4.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
r2KeyNo
expiresInNo
uploadUrlNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "$schema": "http://json-schema.org/draft-07/schema#",
      +  "additionalProperties": false,
      +  "properties": {
      +    "expiresIn": {
      +      "anyOf": [
      +        {
      +          "anyOf": [
      +            {
      +              "type": "number"
      +            },
      +            {
      +              "type": "string"
      +            }
      +          ]
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ]
      +    },
      +    "r2Key": {
      +      "anyOf": [
      +        {
      +          "type": "string"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ]
      +    },
      +    "uploadUrl": {
      +      "anyOf": [
      +        {
      +          "type": "string"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ]
      +    }
      +  },
      +  "type": "object"
      +}
  2. First observed

TDQS

A4.4/5.0
Behavior4/5

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

Annotations only mark the tool as non-readonly/non-idempotent and don't describe the side effect. The description adds meaningful behavior: it reserves a URL rather than uploading bytes, and frames it as a large direct browser upload path. It doesn't go into URL expiry or a required finalize step, but the core mutation is clear enough that agents won't assume bytes are sent in this call.

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 purpose is front-loaded in the first sentence and the alternative is named in the second. It is concise overall, though the second and third sentences partly repeat the same routing advice ('use upload_media instead' and 'prefer upload_media for normal files'), keeping it just below a perfect score.

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 two-parameter tool with a full input schema, an output schema, and an annotation block, the description gives enough selection and invocation guidance. It names the sibling alternative and the conditions that choose between them, so nothing critical is missing for calling this tool 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 100% and both parameters have descriptions, so the schema already defines sizeBytes and contentType. The description adds the 'large direct upload' context but no syntax or format details beyond the schema, so 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?

The description states a specific verb and resource: 'Reserve a presigned upload URL for a direct browser upload'. It also scopes the tool to the composer UI and explicitly distinguishes it from upload_media, so an agent can identify what this tool does without opening the 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?

It gives explicit routing: scripted uploads should use upload_media, and presigned large direct uploads should use this tool, with 'advanced' and 'prefer upload_media for normal files' as guardrails. These are concrete when/when-not conditions, not implied context.

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