Skip to main content
Glama

Download media from a URL

import_media

Download video or audio from any URL to hosted storage and get a direct link, with an optional transcript. Returns a jobId to poll for the result.

Instructions

Download the video/audio at any URL (YouTube, TikTok, X, and 1000+ sites) to hosted storage and get back a direct download link. Async: returns a jobId immediately; poll check_import for the result. Optionally also produce a transcript in the same job with includeTranscript. If the credit balance doesn't cover the requested videoQuality, it downloads at the highest quality the balance covers and check_import names the quality used. Runs the same job as POST /import in the REST API, so it doubles as a test call while building downloads into the user's app; for that app code, call get_integration_guide.

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": "import_media"
  }
}

Input Schema

NameRequiredDescriptionDefault
urlYesMedia page URL, e.g. https://www.youtube.com/watch?v=...
audioQualityNoDefault medium
includeAudioNoInclude audio stream (default true)
includeVideoNoInclude video stream (default true)
videoQualityNoDefault 720p. Drops to the highest quality the credit balance covers when it can't pay for this one
maxCostDollarsNoMost this request may cost in total, in dollars (download plus transcript), at least 0.01. If it would cost more, nothing is downloaded and the job fails with MAX_COST_EXCEEDED and the price, for a $0.003 price check
compatibleCodecsNoPrefer H.264 video and AAC audio, which play everywhere (Safari, iOS, editors), over smaller AV1/VP9 files at the same resolution. Default false
includeTranscriptNoAlso transcribe the audio in the same job
transcriptLanguageNoISO language hint for the transcript, e.g. "en"

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changedv0.2.1
    • addedInput schema / properties / compatibleCodecs
      Added value: +{
      +  "description": "Prefer H.264 video and AAC audio, which play everywhere (Safari, iOS, editors), over smaller AV1/VP9 files at the same resolution. Default false",
      +  "type": "boolean"
      +}
    • addedInput schema / properties / maxCostDollars
      Added value: +{
      +  "description": "Most this request may cost in total, in dollars (download plus transcript), at least 0.01. If it would cost more, nothing is downloaded and the job fails with MAX_COST_EXCEEDED and the price, for a $0.003 price check",
      +  "minimum": 0.01,
      +  "type": "number"
      +}
    • changedInput schema / properties / videoQuality / description
      Previous value: -"Default 720p"New value: +"Default 720p. Drops to the highest quality the credit balance covers when it can't pay for this one"
  2. First observedv0.1.0

TDQS

A4.4/5.0
Behavior5/5

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

Annotations only say non-read-only, open-world, non-idempotent, non-destructive. The description adds the traits an agent actually needs: job-based async flow, the jobId contract, credit-balance-driven quality degradation with check_import naming the quality used, and the MAX_COST_EXCEEDED all-or-nothing failure mode on maxCostDollars.

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-loads the core action and return, then layers the async contract and edge cases in short clauses. The REST API equivalence sentence is slightly tangential but earns its place by explaining the tool's dual role for app testing.

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, the description covers what comes back (jobId, then a direct link via check_import) and the two non-obvious behaviors (cost cap failure, quality downgrade). An agent can call it and handle the result without further inference.

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 description coverage is 100%, so every parameter is already documented at the field level, and the description largely restates the videoQuality fallback already present in the schema. It adds only marginal framing (transcript produced 'in the same job') beyond what structured fields provide.

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 ('Download the video/audio at any URL ... to hosted storage') plus the return value (a direct download link) and broad site coverage. It also distinguishes itself from the async result path by naming check_import and from the app-building path by naming get_integration_guide.

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 clear operating context: this is async, returns a jobId immediately, and the caller must poll check_import. It also routes app developers to get_integration_guide. What it lacks is an explicit exclusion — e.g. when to prefer transcribe_media for transcript-only work — though includeTranscript covers most of that case.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.