Skip to main content
Glama

Import media

creator_import_media

Add a local PNG, SVG, Lottie, .lottie, .riv, audio or font file to the document as media/, without base64. source "upload" returns a URL: PUT the bytes there within 15 minutes, with no credentials. Scripts pass {file: "media/"} to createImageAsset, loadBytes, createAudioAsset or loadFont.

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": {
      "source": "<source>",
      "name": "<name>"
    },
    "name": "creator_import_media"
  }
}

Input Schema

NameRequiredDescriptionDefault
nameYesSuch as music or logo.svg; the extension follows contentType.
bytesNoupload: the file's exact size.
sourceYes"upload".
replaceNoReplace an existing name.
documentIdNo
contentTypeNoupload: such as image/png, audio/mpeg, font/ttf.

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedOutput schema / anyOf
      Previous value: -[
      -  {
      -    "additionalProperties": false,
      -    "properties": {
      -      "attribution": {
      -        "description": "Credit the user must give when using the file.",
      -        "type": "string"
      -      },
      -      "bytes": {
      -        "minimum": 0,
      -        "type": "integer"
      -      },
      -      "contentType": {
      -        "type": "string"
      -      },
      -      "createdAt": {
      -        "type": "string"
      -      },
      -      "documentId": {
      -        "type": "string"
      -      },
      -      "downloadExpiresAt": {
      -        "type": "string"
      -      },
      -      "downloadUrl": {
      -        "type": "string"
      -      },
      -      "durationS": {
      -        "type": "number"
      -      },
      -      "expiresAt": {
      -        "description": "When an open upload stops accepting its PUT.",
      -        "type": "string"
      -      },
      -      "file": {
      -        "description": "media/<name>: the path scripts and the file tools use.",
      -        "type": "string"
      -      },
      -      "height": {
      -        "minimum": 0,
      -        "type": "integer"
      -      },
      -      "method": {
      -        "const": "PUT"
      -      },
      -      "mime": {
      -        "type": "string"
      -      },
      -      "note": {
      -        "description": "What to do with this result.",
      -        "type": "string"
      -      },
      -      "origin": {
      -        "enum": [
      -          "upload"
      -        ]
      -      },
      -      "sha256": {
      -        "type": "string"
      -      },
      -      "source": {
      -        "type": "string"
      -      },
      -      "status": {
      -        "enum": [
      -          "pending",
      -          "ready",
      -          "error"
      -        ]
      -      },
      -      "type": {
      -        "enum": [
      -          "image",
      -          "svg",
      -          "lottie",
      -          "rive",
      -          "audio",
      -          "font"
      -        ]
      -      },
      -      "uploadBytes": {
      -        "minimum": 1,
      -        "type": "integer"
      -      },
      -      "uri": {
      -        "type": "string"
      -      },
      -      "url": {
      -        "description": "Takes one PUT of exactly uploadBytes bytes with Content-Type contentType; the URL is the only credential, so do not add any.",
      -        "type": "string"
      -      },
      -      "warnings": {
      -        "items": {
      -          "type": "string"
      -        },
      -        "type": "array"
      -      },
      -      "width": {
      -        "minimum": 0,
      -        "type": "integer"
      -      }
      -    },
      -    "required": [
      -      "file",
      -      "status",
      -      "origin",
      -      "documentId",
      -      "createdAt"
      -    ],
      -    "type": "object"
      -  },
      -  {
      -    "additionalProperties": true,
      -    "properties": {
      -      "error": {
      -        "additionalProperties": false,
      -        "properties": {
      -          "code": {
      -            "type": "string"
      -          },
      -          "hint": {
      -            "description": "A short remedy, when one applies; also folded into message.",
      -            "type": "string"
      -          },
      -          "line": {
      -            "description": "1-based user-code line the error occurred on, when known.",
      -            "minimum": 1,
      -            "type": "integer"
      -          },
      -          "message": {
      -            "type": "string"
      -          },
      -          "retryable": {
      -            "type": "boolean"
      -          },
      -          "source": {
      -            "description": "The offending source line, trimmed to 160 characters.",
      -            "type": "string"
      -          }
      -        },
      -        "required": [
      -          "code",
      -          "message",
      -          "retryable"
      -        ],
      -        "type": "object"
      -      }
      -    },
      -    "required": [
      -      "error"
      -    ]
      -  }
      -]New value: +[
      +  {
      +    "additionalProperties": false,
      +    "properties": {
      +      "attribution": {
      +        "description": "Credit the user must give when using the file.",
      +        "type": "string"
      +      },
      +      "bytes": {
      +        "minimum": 0,
      +        "type": "integer"
      +      },
      +      "contentType": {
      +        "type": "string"
      +      },
      +      "createdAt": {
      +        "type": "string"
      +      },
      +      "documentId": {
      +        "type": "string"
      +      },
      +      "downloadExpiresAt": {
      +        "type": "string"
      +      },
      +      "downloadUrl": {
      +        "type": "string"
      +      },
      +      "durationS": {
      +        "type": "number"
      +      },
      +      "expiresAt": {
      +        "description": "When an open upload stops accepting its PUT.",
      +        "type": "string"
      +      },
      +      "file": {
      +        "description": "media/<name>: the path scripts and the file tools use.",
      +        "type": "string"
      +      },
      +      "height": {
      +        "minimum": 0,
      +        "type": "integer"
      +      },
      +      "kind": {
      +        "enum": [
      +          "image",
      +          "vector",
      +          "music",
      +          "speech"
      +        ]
      +      },
      +      "method": {
      +        "const": "PUT"
      +      },
      +      "mime": {
      +        "type": "string"
      +      },
      +      "model": {
      +        "type": "string"
      +      },
      +      "note": {
      +        "description": "What to do with this result.",
      +        "type": "string"
      +      },
      +      "origin": {
      +        "enum": [
      +          "upload",
      +          "generate"
      +        ]
      +      },
      +      "prompt": {
      +        "type": "string"
      +      },
      +      "provider": {
      +        "type": "string"
      +      },
      +      "retryAfterS": {
      +        "description": "0: call creator_download_file now, it waits for the result.",
      +        "minimum": 0,
      +        "type": "integer"
      +      },
      +      "sha256": {
      +        "type": "string"
      +      },
      +      "source": {
      +        "type": "string"
      +      },
      +      "status": {
      +        "enum": [
      +          "pending",
      +          "generating",
      +          "ready",
      +          "error"
      +        ]
      +      },
      +      "style": {
      +        "type": "string"
      +      },
      +      "text": {
      +        "type": "string"
      +      },
      +      "type": {
      +        "enum": [
      +          "image",
      +          "svg",
      +          "lottie",
      +          "rive",
      +          "audio",
      +          "font"
      +        ]
      +      },
      +      "uploadBytes": {
      +        "minimum": 1,
      +        "type": "integer"
      +      },
      +      "uri": {
      +        "type": "string"
      +      },
      +      "url": {
      +        "description": "Takes one PUT of exactly uploadBytes bytes with Content-Type contentType; the URL is the only credential, so do not add any.",
      +        "type": "string"
      +      },
      +      "warnings": {
      +        "items": {
      +          "type": "string"
      +        },
      +        "type": "array"
      +      },
      +      "width": {
      +        "minimum": 0,
      +        "type": "integer"
      +      }
      +    },
      +    "required": [
      +      "file",
      +      "status",
      +      "origin",
      +      "documentId",
      +      "createdAt"
      +    ],
      +    "type": "object"
      +  },
      +  {
      +    "additionalProperties": true,
      +    "properties": {
      +      "error": {
      +        "additionalProperties": false,
      +        "properties": {
      +          "code": {
      +            "type": "string"
      +          },
      +          "hint": {
      +            "description": "A short remedy, when one applies; also folded into message.",
      +            "type": "string"
      +          },
      +          "line": {
      +            "description": "1-based user-code line the error occurred on, when known.",
      +            "minimum": 1,
      +            "type": "integer"
      +          },
      +          "message": {
      +            "type": "string"
      +          },
      +          "retryable": {
      +            "type": "boolean"
      +          },
      +          "source": {
      +            "description": "The offending source line, trimmed to 160 characters.",
      +            "type": "string"
      +          }
      +        },
      +        "required": [
      +          "code",
      +          "message",
      +          "retryable"
      +        ],
      +        "type": "object"
      +      }
      +    },
      +    "required": [
      +      "error"
      +    ]
      +  }
      +]
  2. First observed

TDQS

A4/5.0
Behavior4/5

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

Annotations declare only the generic safety profile (writes, non-idempotent, non-destructive, not open-world); the description adds the traits that actually matter — an out-of-band, credential-free PUT with a 15-minute expiry, and how the uploaded object is consumed downstream by createImageAsset/loadBytes/createAudioAsset/loadFont. It does not say what happens if the upload window lapses or whether a partial upload leaves a dangling media entry.

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?

Three tightly packed sentences with the resource and path convention front-loaded, followed by the upload mechanics. The final sentence crams four function names into one clause, but 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?

An output schema exists, so return shapes need no prose; the description instead covers the interaction model (URL handoff, TTL, downstream reference) that the schema cannot express. Only the undocumented documentId and the failure modes of an expired upload are left open.

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 already 83%, so the baseline is 3; the description earns an extra point by explaining the generated path form media/<name> and the relationship between name, contentType and the extension, and by framing source='upload' as the only flow. The documentId parameter remains unexplained in both places.

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?

The description gives a specific verb and resource ('Add a local PNG, SVG, Lottie, .lottie, .riv, audio or font file to the document') plus the destination naming convention media/<name>, and the 'without base64' clause hints at why it exists rather than generate_media. It stops short of naming the sibling it differs from, so an agent must still infer the boundary against creator_generate_media and creator_load_from_workspace.

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?

It spells out the actual operating procedure: source 'upload' returns a URL, PUT the bytes there within 15 minutes with no credentials, then reference the result via {file: "media/<name>"} in downstream script calls. That is clear usage context, but it never states when to prefer this over the sibling generation or workspace-load tools.

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.