Skip to main content
Glama

download_url_to_bucket

Server-side copy of a public URL into a bucket (no transcoding).

The server fetches `source_url` itself and streams the bytes straight into
the bucket via a short-lived presigned upload — use this to ingest an
existing asset into Qencode Media Storage as-is. To store a *transcoded*
result instead, set a `destination` on a transcoding job.

IMPORTANT — this call is synchronous and blocking: it returns only after the
whole file has been fetched and uploaded, and there is no job token or
progress to poll (unlike transcoding). The transfer must finish inside the
presigned upload window (~10 minutes) and is size-capped server-side, so it
suits small/medium assets; very large or slow sources may time out — upload
those out-of-band instead.

Args:
    source_url: a publicly reachable `http(s)` URL the server can fetch
        directly. Non-http(s) schemes and private/loopback hosts are
        rejected up front; a source that responds with a redirect or a
        4xx/5xx fails the transfer. HTTP redirects are not followed (SSRF);
        the tool returns `status: "redirect_not_followed"` with the
        `Location` header when it is a public URL you can pass back in.
    bucket: destination bucket name. Must already exist on this account
        (see `list_buckets`). An unknown name returns
        `status: "bucket_not_found"` with recovery instructions — not an
        MCP error. Call `list_buckets` and retry with a listed name; do
        not retry the same name.
    key: destination object key (e.g. `raw/input.mov`). An existing object
        at this key is refused (`status: "object_exists"`) — this tool
        does not overwrite. Pick a new key.

Returns `{bucket, key, size_bytes, status: "uploaded"}` on success.
Unknown bucket: `{status: "bucket_not_found", error: "..."}` (same
envelope, `size_bytes` 0). Occupied key: `status: "object_exists"`.
Account suspended: `status: "unavailable"`.

This result has no URL. After `status: "uploaded"`, fetch the link in a
second call. Copy `cdn_url` from `list_objects` when the bucket has one.
If it does not (`cdn_origin` still provisioning, or the bucket is private),
call `get_download_url` and use that presigned URL. Do not assemble a URL
from the bucket name, region, or `destination_prefix`.

SCOPE — this writes using the caller's existing Qencode sign-in: no
separate storage permission, no second approval prompt. The target bucket
belongs to the WHOLE ACCOUNT and is visible to all of its projects. If that
bucket is public, whatever you ingest becomes readable by anyone with its
URL. Act on an explicit request or clear prior context; never ingest
unprompted.

Input Schema

NameRequiredDescriptionDefault
keyYes
bucketYes
source_urlYes

Output Schema

NameRequiredDescriptionDefault
keyYes
errorNo
bucketYes
statusYes
locationNo
size_bytesYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • addedOutput schema / properties / error
      Added value: +{
      +  "type": "string"
      +}
    • addedOutput schema / properties / location
      Added value: +{
      +  "type": "string"
      +}
  2. First observed

TDQS

A4.9/5.0
Behavior5/5

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

Annotations mark it non-read-only/open-world/non-idempotent, and the description adds substantial behavior beyond that: synchronous blocking with no job token to poll, a ~10-minute presigned window, server-side size cap, no overwrite on existing keys, SSRF protections (no private/loopback hosts, redirects not followed), and no separate storage permission prompt.

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 and structured into purpose/args/returns/scope sections, and nearly every sentence carries distinct operational value (status codes, recovery steps, SSRF rules). It is however quite long with some repetition of the error-status theme, so not maximally tight.

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?

Despite an output schema existing, the description correctly documents the status envelope variants (uploaded/bucket_not_found/object_exists/unavailable/redirect_not_followed) and closes the loop on obtaining a URL afterward. For a complex, blocking, permission-sensitive ingest tool, an agent has everything needed to call it correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description carries the full burden and does so: source_url (http(s) only, redirect/4xx/5xx failure semantics), bucket (must exist, links to list_buckets, error envelope), and key (example format, refuses existing objects). This far exceeds the schema, which only lists bare property names.

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?

Opens with a specific verb+resource+scope: 'Server-side copy of a public URL into a bucket (no transcoding).' It explicitly distinguishes itself from the transcoding path ('To store a transcoded result instead, set a destination on a transcoding job'), so an agent can tell it apart from start_encode2_raw/transcode_video without opening schemas.

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 explicit when-to-use ('ingest an existing asset as-is'), when-not (use a transcoding job destination), and named alternatives for follow-up (list_buckets to verify the bucket, list_objects/get_download_url to obtain the resulting URL). It even says 'never ingest unprompted' and to act on explicit request, which is actionable routing 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.