Skip to main content
Glama

create_upload_token

Make an upload token: a short-lived credential to give a browser, such as a recording page, so it uploads assets with upload_asset's REST route without ever holding your API key. It only records assets whose names start with its prefix, up to max_size, in one project, and never replaces an existing asset. It lasts 15 minutes unless expires_in says otherwise.

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": {
      "prefix": "<prefix>"
    },
    "name": "create_upload_token"
  }
}

Input Schema

NameRequiredDescriptionDefault
prefixYesThe token only records assets whose names start with this, such as `recordings/u_42/`.
max_sizeNoThe largest file it records, in bytes; any size assets allow when absent.
expires_inNoSeconds until it expires, from 60 to 86400; 900 (15 minutes) when absent.
project_idNoThe project its assets go in; the workspace's default project when absent.

Output Schema

NameRequiredDescriptionDefault
tokenYesSend it as `Authorization: Bearer <token>` to `PUT /v1/assets/{name}`.
prefixYesEvery asset name it uploads starts with this.
max_sizeYesThe largest file it uploads, in bytes.
expires_atYesRFC 3339.
project_idYesThe project its assets go in.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.6/5.0
Behavior5/5

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

Goes well past the annotations (readOnly=false, destructive=false, openWorld=false) by disclosing the enforcement semantics: the token is prefix-scoped, size-capped, confined to one project, and never overwrites an existing asset. It also states the default 15-minute lifetime and that expires_in can override it, which is exactly the risk/scope context an agent needs before minting a credential.

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?

Purpose is front-loaded in the first clause and every subsequent clause carries real information (scope, no-overwrite, lifetime). The single packed sentence with comma-separated qualifiers is slightly dense and could be broken up for faster scanning, but nothing is wasted.

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 explained, and all four parameters are documented in the schema. The description covers the credential's scope, lifetime, and non-destructive behavior, leaving no meaningful gap for a low-complexity token-minting tool.

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 already 100%, so the baseline is 3; the description adds meaning beyond the field docs by framing prefix as an enforcement boundary ('only records assets whose names start with its prefix') and by repeating the 15-minute default for expires_in. It does not add anything about max_size units or the project_id default beyond what the schema already says.

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 ('Make an upload token') and immediately defines what the artifact is: a short-lived credential handed to a browser. It also differentiates from the sibling upload_asset by explaining the token authorizes uploads via that tool's REST route rather than duplicating it.

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 a concrete use case (a browser recording page uploading assets without holding the API key), which implicitly tells the agent when this tool is the right choice over calling upload_asset directly. It does not explicitly state the inverse case, e.g. that server-side callers should just use upload_asset with their API key, so it falls short of full when/when-not guidance.

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