Skip to main content
Glama

Get upload URL

var2_request_upload

Signed URL to upload a LOCAL file straight into var2 (durable, first-party, no expiry). Use when the user references a local/attached file (a path or a native attachment you can read) and you can perform an HTTP PUT. Flow: 1) call with { filename, type } → upload_url (signed PUT, single-use, ~2h) + public_url. 2) PUT the raw bytes to upload_url (curl -X PUT --data-binary @./logo.png -H "Content-Type: image/png" "<upload_url>") — bytes never pass through model context. 3) pass public_url verbatim as image_url / first_frame_url / reference_image_urls / audio_url / source_video_url. PUT blocked (sandboxed egress / host_not_allowed)? Recover in order, silently: (1) file ≤ ~1MB → var2_upload_asset base64 data + expected_bytes, ~200K-char chunks if needed — automatic; (2) LAST RESORT (too big for base64, or chat-only client with unreadable bytes) → give the user the returned user_upload_page drag-and-drop link; when they say done, var2_confirm_upload with path + type, then continue with public_url. Never downscale a file to dodge a blocked PUT. Not needed when a public https URL already exists (pass it straight to the create/modify tool) or for tiny ≤1MB files (var2_upload_asset base64). Optional: var2_confirm_upload validates the bytes and yields a placeholder_id (needed for var2_join_videos chaining).

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": {
      "type": "<type>"
    },
    "name": "var2_request_upload"
  }
}

Input Schema

NameRequiredDescriptionDefault
typeYesModality of the asset being uploaded.
filenameNoThe local file name (e.g. "logo.png"). Only the extension is used, to give the stored object a clean URL. Optional.
content_typeNoMIME of the file (e.g. "image/png"). Used to pick an extension when filename has none; also send it as the Content-Type of your PUT.

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?

Annotations only say readOnlyHint=false, destructiveHint=false, openWorldHint=false, so the description carries the behavioral load and does: signed PUT is single-use with ~2h expiry, bytes never pass through model context, returned public_url must be passed verbatim into image_url/first_frame_url/etc., and there is a silent recovery order with a 'never downscale' constraint. That is context an agent cannot get from the annotations or schema.

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?

Front-loaded with purpose, then a numbered 3-step flow, then recovery, then exclusions — highly scannable and each block earns its place. It loses a point because the closing 'Not needed when ... ≤1MB → var2_upload_asset base64' repeats the fallback already stated in the recovery step.

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 3-param tool with no output schema, the description still names the returned fields (upload_url, public_url, user_upload_page, placeholder_id), explains what to do with each, and covers the failure path and the optional var2_confirm_upload follow-up for var2_join_videos chaining. Nothing an agent needs to invoke and follow through is missing.

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%, so type, filename and content_type are already documented, including that filename supplies only the extension and content_type is the PUT Content-Type. The description's 'call with { filename, type }' restates the schema and notably omits content_type from that call sketch, adding little beyond what the schema already provides.

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+resource: mint a signed URL so a LOCAL file can be PUT straight into var2. It explicitly separates this from the two sibling paths (var2_upload_asset for base64 / ≤1MB, and passing an existing public https URL directly to a create/modify tool), so the agent can pick this tool 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 an explicit trigger (user references a local/attached file you can read and you can perform an HTTP PUT), explicit exclusions ('Not needed when a public https URL already exists' or for tiny ≤1MB files), and a named recovery ladder to var2_upload_asset and var2_confirm_upload when PUT is blocked. This is when/when-not/alternatives in full.

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