Skip to main content
Glama

Bring in a file

import_media
Idempotent

Brings a picture, clip or song in from a link or a local file, and returns its asset_id. Cost: Free.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "import_media"
  }
}

Input Schema

NameRequiredDescriptionDefault
urlNoA public https link to a picture, clip or song.
fileNoOr a file on this computer (two calls).
nameNoA file name to keep it under.
etagsNoEach part's ETag, in order.
sha256NoThe file's sha256.
video_idNoVideo; the open one if left out.
staging_keyNoAfter sending: its staging_key.
operation_idNoSame id retries run once.

Output Schema

NameRequiredDescriptionDefault
codeNo
costNo
errorNo
stateNo
statusNo
dry_runNo
messageNo
plan_idNo
style_idNo
video_idNo
availableNo
import_idNo
output_idNo
studio_urlNo
version_idNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changed
    • removedInput schema / properties / operation_id / pattern
      Removed value: -"^[a-zA-Z0-9_.:-]{1,100}$"
    • removedInput schema / properties / sha256 / pattern
      Removed value: -"^[a-f0-9]{64}$"
    • removedInput schema / properties / staging_key / pattern
      Removed value: -"^stg_[A-Za-z0-9][A-Za-z0-9_-]{7,95}$"
  2. Changed1 schema field changed
    • changedInput schema / properties / url / description
      Previous value: -"A public https link: picture, clip or song (PNG, JPEG, WebP, MP4, MOV, WebM, MP3, WAV, M4A)."New value: +"A public https link to a picture, clip or song."
  3. Changed2 schema fields changed
    • changedInput schema / properties / url / description
      Previous value: -"A public https link to a picture, clip or song (PNG, JPEG, WebP, MP4, MOV, WebM, MP3, WAV, M4A)."New value: +"A public https link: picture, clip or song (PNG, JPEG, WebP, MP4, MOV, WebM, MP3, WAV, M4A)."
    • changedInput schema / properties / video_id / description
      Previous value: -"The video; the open one when left out."New value: +"Video; the open one if left out."
  4. Changed3 schema fields changed
    • changedInput schema / properties / operation_id / description
      Previous value: -"A retry with the same id runs once."New value: +"Same id retries run once."
    • changedInput schema / properties / video_id / description
      Previous value: -"The video, from list_videos."New value: +"The video; the open one when left out."
    • changedInput schema / required
      Previous value: -[
      -  "video_id"
      -]New value: +[]
  5. Changed7 schema fields changed
    • addedInput schema / properties / etags
      Added value: +{
      +  "description": "Each part's ETag, in order.",
      +  "items": {
      +    "maxLength": 160,
      +    "minLength": 1,
      +    "type": "string"
      +  },
      +  "maxItems": 64,
      +  "minItems": 1,
      +  "type": "array"
      +}
    • addedInput schema / properties / file
      Added value: +{
      +  "additionalProperties": false,
      +  "description": "Or a file on this computer (two calls).",
      +  "properties": {
      +    "bytes": {
      +      "description": "Its size in bytes.",
      +      "exclusiveMinimum": 0,
      +      "maximum": 104857600,
      +      "type": "integer"
      +    },
      +    "name": {
      +      "description": "Its name with extension.",
      +      "maxLength": 200,
      +      "minLength": 3,
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "name",
      +    "bytes"
      +  ],
      +  "type": "object"
      +}
    • changedInput schema / properties / operation_id / description
      Previous value: -"The same id on a retry runs it once; a new id is a new request."New value: +"A retry with the same id runs once."
    • addedInput schema / properties / sha256
      Added value: +{
      +  "description": "The file's sha256.",
      +  "pattern": "^[a-f0-9]{64}$",
      +  "type": "string"
      +}
    • addedInput schema / properties / staging_key
      Added value: +{
      +  "description": "After sending: its staging_key.",
      +  "pattern": "^stg_[A-Za-z0-9][A-Za-z0-9_-]{7,95}$",
      +  "type": "string"
      +}
    • changedInput schema / properties / url / description
      Previous value: -"A public https link to a picture, clip or song (PNG, JPEG, WebP, GIF, MP4, MOV, WebM, MP3, WAV, M4A)."New value: +"A public https link to a picture, clip or song (PNG, JPEG, WebP, MP4, MOV, WebM, MP3, WAV, M4A)."
    • changedInput schema / required
      Previous value: -[
      -  "video_id",
      -  "url"
      -]New value: +[
      +  "video_id"
      +]
  6. Added

TDQS

B3.4/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=false, openWorldHint=true, idempotentHint=true and destructiveHint=false. The description adds two things beyond that: the returned asset_id and the notable fact that the operation is free of cost. It omits the two-call file-upload flow and the retry semantics, but those are documented in the schema.

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?

Two short sentences, front-loaded with the core action and source options, ending with the return value and a cost note. Nothing is redundant or padded.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For an 8-parameter tool with a nested file object, the description plus the fully documented schema and the existing output schema give an agent enough to call it correctly. The remaining gap is the multi-step staging flow, which the schema hints at but the description never narrates.

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 each of the 8 parameters is already documented at the field level, including the url/file alternative and its '(two calls)' note. The description only restates that high-level source choice, adding little semantics beyond the schema; baseline 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb ('Brings ... in') and the resources it handles — picture, clip or song — plus the source options (link or local file) and the return value. It implicitly differentiates from import_font and import_asset by naming media types, though it never names those siblings explicitly.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance on when to choose this over import_asset or import_font, and no stated prerequisites. The only implied routing is 'media file → this tool', which the agent must infer from the enumerated media types.

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