Skip to main content
Glama

Upload Media

upload_media

Upload existing media for the selected brand. request reserves a pending asset and returns uploadUrl, assetId, method and constraints. PUT sends bytes with returned headers; POST_JSON sends localUpload with base64 bytes in localUpload.source.data. Then complete finalizes the upload and returns assetId and any hosted URL; complete with publicImage true also returns a permanent publicUrl for an image that an article uses as its cover or inline image. Does not attach media to anything; publicImage makes that one image publicly readable. To delete Library media use control_release(action=remove_asset).

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": {
      "action": "<action>",
      "input": "<input>"
    },
    "name": "upload_media"
  }
}

Input Schema

NameRequiredDescriptionDefault
inputYesThe fields of the chosen action.
actionYesrequest: Reserve a pending asset for the selected brand and return uploadUrl, assetId, method, and constraints. complete: Finalize a presigned media upload.
organizationNoOrganization this call acts in: its name, slug or id from get_context(action=organizations). Required when the connection covers several organizations (a call without it is refused with the list of organizations and their brands); a connection limited to one organization works inside it, so leave this argument out there (naming any organization is refused).

Output Schema

NameRequiredDescriptionDefault
dataNo
messageNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.4/5.0
Behavior3/5

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

Annotations already declare non-read-only, non-destructive, non-idempotent and open-world, and the description adds meaningful context: a pending asset is reserved first, the returned constraints/headers must be honored, and publicImage produces a permanent world-readable URL. However, the privacy implication of publicImage is only hinted at ('Leave it out for anything private' appears in the schema, not the description) and nothing is said about expiry of the presigned URL or what happens to an abandoned pending asset.

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 flow is front-loaded and every sentence carries operational content; there is no filler or restatement of the name. It is dense with semicolon-chained clauses, which slightly slows parsing of the request/PUT/POST_JSON/complete sequence, 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?

For a multi-step, multi-transport upload tool, the description covers the sequencing, the transfer method, finalization, the public-image variant, and the delete hand-off. An output schema exists, so return-value details are optional, yet the key returned fields are still named where they matter.

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 genuinely adds invocation meaning the schema does not carry: it explains the ordering of actions and that POST_JSON expects the bytes nested at localUpload.source.data, a payload detail absent from the schema. It also spells out the downstream effect of publicImage (permanent publicUrl usable as an article cover or inline image), which is more actionable than the schema's terse field note.

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 ('Upload existing media') and lays out the exact two-step protocol (request → PUT/POST_JSON → complete), so an agent knows both the goal and the mechanism. The 'existing media' framing implicitly separates it from generation siblings, and it explicitly names control_release for the deletion case.

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 when-to-use routing between the two actions (request reserves, complete finalizes), explains the two alternative byte-transfer paths with their distinct payloads, and states an exclusion ('Does not attach media to anything'). It also redirects the delete case to control_release(action=remove_asset) rather than leaving the agent to guess.

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.