Skip to main content
Glama

Import media from URL

upload_asset

Import a direct file URL or public social post into the asset library. Social links support YouTube, TikTok, Instagram, Facebook, X/Twitter, LinkedIn, and Reddit (beta). Omit content_type for social links. Returns a job ID: call check_job until completed for the permanent media URL and asset ID. Use type audio for audio-only downloads on YouTube, TikTok, Instagram, or Facebook. X/LinkedIn/Reddit use downloadable post attachments; streaming-only Reddit videos with separate audio tracks are unsupported. Private or deleted posts cannot be imported. Social downloads default to 480p and cost 1.2 credits per started minute for audio/480p, 4.8 for 720p/1080p, with the total rounded up once per import; post-attachment lookup costs 2 credits per post. Before paid social imports, estimate_generation with operation media_import and params url/type/quality/max_duration previews the source duration, credit reservation and affordability. The full bounded quote is reserved upfront, unused credits are returned on completion, and the final charge cannot exceed the reservation. Unknown source durations use an affordable duration rejection limit. Sources longer than max_duration are rejected, not trimmed. Repeating a request returns its existing job, and an import already in the Library costs nothing.

Direct files are downloaded and stored for free and return immediately with the stored asset and its permanent URL: images, videos, audio, 3D models (glb, gltf served as model/gltf+json, obj, stl, usdz) and ZIP archives (type zip, up to 1 GiB). The type is read from the source headers or the file extension; pass type for a generic type such as application/octet-stream. The first bytes are checked, so HTML pages and JSON/API responses are rejected.

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": {
      "url": "<url>"
    },
    "name": "upload_asset"
  }
}

Input Schema

NameRequiredDescriptionDefault
urlYesPublic direct file URL or supported social post URL to import and store permanently. Social imports return a job ID for check_job.
nameNoAsset name; defaults to the file name.
tagsNoTags for organizing the asset.
typeNoExpected type of a direct file; the import fails if the file is another type. Required for a ZIP (zip) or 3D model (3d_model) served with a generic type such as application/octet-stream. For social links, omit for video or use audio for audio-only downloads.
qualityNoSocial video resolution: 480p (default, 1.2 credits per started minute), 720p or 1080p (4.8). Total credits round up once per import. Ignored for type audio.
descriptionNoAccepted for compatibility; not stored.
skills_usedNoOptional workflow analytics: names of the skills (or skill/reference paths) followed for this call. Stored with generation jobs only. Never include private data, local paths or media URLs.
content_typeNoAccepted for compatibility; the type is read from the file. Omit for social links.
max_durationNoFor social links, reject longer sources before downloading. Default 7200 seconds. This rejects long sources; it does not trim them.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.8/5.0
Behavior5/5

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

Beyond the annotations (readOnlyHint=false, openWorldHint=true, destructiveHint=false), the description discloses credit pricing and rounding, upfront reservation with unused credits returned, the guarantee that the final charge cannot exceed the reservation, the affordable duration rejection limit for unknown durations, rejection versus trimming for max_duration, and the 1 GiB ZIP cap. The dedup claim that 'repeating a request returns its existing job' sits in mild tension with idempotentHint=false, though it reads as scoped job-dedup rather than a full reversal of that hint.

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?

It is front-loaded with the direct-file versus social distinction and then organized into two coherent paragraphs, and nearly every sentence carries operational value (magic-byte validation, rejection versus trimming, free direct downloads). It is dense at roughly 330 words, with some redundancy — the per-minute credit figures and rounding rule are repeated from the quality parameter schema description.

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 9-parameter, no-output-schema tool with real cost and failure modes, the description covers the return contract (job ID then check_job for the permanent URL and asset ID versus immediate return for direct files), the cost model, unsupported source classes, and type resolution. Nothing an agent needs in order to call this correctly and avoid surprise charges is missing.

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 adds cross-parameter meaning the schema states only per-field: content_type must be omitted for social links, type must be supplied for generic application/octet-stream sources, ZIP is capped at 1 GiB, and type audio applies only to specific platforms. It clarifies how the parameters interact rather than restating their individual descriptions.

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 first sentence states a specific verb and resource — import a direct file URL or public social post into the asset library — and immediately splits the two modes of operation. An agent can distinguish this from sibling upload paths (get_upload_url, import_media, confirm_upload) 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?

It names explicit routing rules and sibling dependencies: call check_job until completion for social imports, call estimate_generation with operation media_import before paid social imports, omit content_type for social links, and use type audio for audio-only downloads. It also states exclusions (private/deleted posts, streaming-only Reddit videos with split audio, HTML/JSON responses) rather than leaving them to inference.

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.