Skip to main content
Glama

Import Media

import_media

Import a media item into your library from a public URL — the agent-friendly ingest path (single call, no upload protocol). Pass url (https) + filename (+ optional contentType). Returns { id, status:"importing" }. Processing is async: call wait_job(kind="media", id=mediaItemId), or register a webhook (create_webhook on media.completed — status: complete|failed rides the payload). Use the returned id with get_media_context, suggest_briefs, or as a composition source.

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": {
      "body": "<body>"
    },
    "name": "import_media"
  }
}

Input Schema

NameRequiredDescriptionDefault
bodyYesPOST /media/import body.
commandIdNoRetry identity. A call repeated with the same commandId returns the first result instead of acting twice.

Output Schema

NameRequiredDescriptionDefault
idNo
statusNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / $defs / __schema2 / enum
      Previous value: -[
      -  "video/mp4",
      -  "video/quicktime",
      -  "video/x-matroska",
      -  "video/webm",
      -  "audio/mpeg",
      -  "audio/wav",
      -  "audio/x-wav",
      -  "audio/mp4",
      -  "audio/aac",
      -  "image/png",
      -  "image/jpeg",
      -  "image/webp",
      -  "image/gif",
      -  "image/svg+xml",
      -  "application/json",
      -  "font/ttf",
      -  "font/otf",
      -  "font/woff",
      -  "font/woff2"
      -]New value: +[
      +  "video/mp4",
      +  "video/quicktime",
      +  "video/x-matroska",
      +  "video/webm",
      +  "audio/mpeg",
      +  "audio/wav",
      +  "audio/x-wav",
      +  "audio/mp4",
      +  "audio/aac",
      +  "image/png",
      +  "image/jpeg",
      +  "image/webp",
      +  "image/gif",
      +  "image/svg+xml",
      +  "image/vnd.radiance",
      +  "model/gltf-binary",
      +  "application/json",
      +  "font/ttf",
      +  "font/otf",
      +  "font/woff",
      +  "font/woff2",
      +  "application/x-cube"
      +]
  2. Changed24 schema fields changed
    • addedInput schema / $defs
      Added value: +{
      +  "__schema0": {
      +    "format": "uri",
      +    "maxLength": 2048,
      +    "type": "string"
      +  },
      +  "__schema1": {
      +    "maxLength": 500,
      +    "minLength": 1,
      +    "type": "string"
      +  },
      +  "__schema2": {
      +    "enum": [
      +      "video/mp4",
      +      "video/quicktime",
      +      "video/x-matroska",
      +      "video/webm",
      +      "audio/mpeg",
      +      "audio/wav",
      +      "audio/x-wav",
      +      "audio/mp4",
      +      "audio/aac",
      +      "image/png",
      +      "image/jpeg",
      +      "image/webp",
      +      "image/gif",
      +      "image/svg+xml",
      +      "application/json",
      +      "font/ttf",
      +      "font/otf",
      +      "font/woff",
      +      "font/woff2"
      +    ],
      +    "type": "string"
      +  },
      +  "__schema3": {
      +    "exclusiveMinimum": 0,
      +    "maximum": 10737418240,
      +    "type": "integer"
      +  },
      +  "__schema4": {
      +    "description": "Declared audio role: 'vo' (narration), 'music' (bed that ducks under speech), 'sfx' (one-shot hit), 'ambience' (a bed that HOLDS under VO — never ducks).",
      +    "enum": [
      +      "vo",
      +      "music",
      +      "sfx",
      +      "ambience"
      +    ],
      +    "type": "string"
      +  },
      +  "__schema5": {
      +    "maxLength": 128,
      +    "minLength": 1,
      +    "type": "string"
      +  }
      +}
    • addedInput schema / properties / body / properties / audioRole / $ref
      Added value: +"#/$defs/__schema4"
    • removedInput schema / properties / body / properties / audioRole / description
      Removed value: -"Declared audio role: 'vo' (narration), 'music' (bed that ducks under speech), 'sfx' (one-shot hit), 'ambience' (a bed that HOLDS under VO — never ducks)."
    • removedInput schema / properties / body / properties / audioRole / enum
      Removed value: -[
      -  "vo",
      -  "music",
      -  "sfx",
      -  "ambience"
      -]
    • removedInput schema / properties / body / properties / audioRole / type
      Removed value: -"string"
    • addedInput schema / properties / body / properties / contentType / $ref
      Added value: +"#/$defs/__schema2"
    • removedInput schema / properties / body / properties / contentType / enum
      Removed value: -[
      -  "video/mp4",
      -  "video/quicktime",
      -  "video/x-matroska",
      -  "video/webm",
      -  "audio/mpeg",
      -  "audio/wav",
      -  "audio/x-wav",
      -  "audio/mp4",
      -  "audio/aac",
      -  "image/png",
      -  "image/jpeg",
      -  "image/webp",
      -  "image/gif",
      -  "image/svg+xml",
      -  "application/json",
      -  "font/ttf",
      -  "font/otf",
      -  "font/woff",
      -  "font/woff2"
      -]
    • removedInput schema / properties / body / properties / contentType / type
      Removed value: -"string"
    • addedInput schema / properties / body / properties / filename / $ref
      Added value: +"#/$defs/__schema1"
    • removedInput schema / properties / body / properties / filename / maxLength
      Removed value: -500
    • removedInput schema / properties / body / properties / filename / minLength
      Removed value: -1
    • removedInput schema / properties / body / properties / filename / type
      Removed value: -"string"
    • addedInput schema / properties / body / properties / size / $ref
      Added value: +"#/$defs/__schema3"
    • removedInput schema / properties / body / properties / size / exclusiveMinimum
      Removed value: -0
    • removedInput schema / properties / body / properties / size / maximum
      Removed value: -10737418240
    • removedInput schema / properties / body / properties / size / type
      Removed value: -"integer"
    • addedInput schema / properties / body / properties / url / $ref
      Added value: +"#/$defs/__schema0"
    • removedInput schema / properties / body / properties / url / format
      Removed value: -"uri"
    • removedInput schema / properties / body / properties / url / maxLength
      Removed value: -2048
    • removedInput schema / properties / body / properties / url / type
      Removed value: -"string"
    • addedInput schema / properties / commandId / $ref
      Added value: +"#/$defs/__schema5"
    • removedInput schema / properties / commandId / maxLength
      Removed value: -128
    • removedInput schema / properties / commandId / minLength
      Removed value: -1
    • removedInput schema / properties / commandId / type
      Removed value: -"string"
  3. Changed1 schema field changed
    • addedInput schema / properties / commandId
      Added value: +{
      +  "description": "Retry identity. A call repeated with the same commandId returns the first result instead of acting twice.",
      +  "maxLength": 128,
      +  "minLength": 1,
      +  "type": "string"
      +}
  4. First observed

TDQS

A4.5/5.0
Behavior5/5

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

Annotations only declare the safety profile (non-read-only, open-world, non-idempotent, non-destructive); the description supplies what they cannot: the operation is asynchronous, what is returned ('{ id, status: "importing" }'), how to await completion, and the alternative webhook path with its payload semantics. That is exactly the behavioral context an agent needs beyond the structured hints.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

A single tight paragraph with the primary action and mechanism front-loaded, then inputs, then return value, then follow-up. Every sentence carries information an agent must act on.

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?

Even though an output schema exists, the description still documents the async contract and downstream consumers (get_media_context, suggest_briefs, composition source), which the schema cannot express. Nothing critical to calling it correctly 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 baseline is 3. The description adds the 'https' requirement for url (more specific than format: uri) but omits the size and audioRole inputs entirely, and calls contentType optional even though the schema lists it under required — a small inaccuracy that could mislead.

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 ('Import a media item into your library from a public URL') plus the ingestion mechanism. The parenthetical 'single call, no upload protocol' implicitly separates it from the create_upload/finalize_upload siblings, so an agent can pick it without opening another schema.

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 usage context ('agent-friendly ingest path, single call, no upload protocol') and an explicit follow-up path (wait_job or create_webhook). It stops short of naming a concrete alternative for the case when a local file rather than a public URL is the source, which is the one branching decision an agent faces here.

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.