Skip to main content
Glama

Add Media

lab_add_media

Bring your own video, audio or image into a project — not generated, yours. Two ways: media_url (a public http(s) address; the server fetches it, max 100 MB) or file_name + content_type (you get a signed upload_url and the header that are part of its signature: PUT the file's raw bytes there within the hour with EXACTLY those headers — the answer's anleitung has the ready curl line; a missing header is a 403). Either way the answer is the asset_key — use it in lab_timeline_apply as clips[].asset_key (video) or bett.asset_key (audio). A URL import also returns url, a signed address (24 h) for tools that want an address; an uploaded file shows up as the newest row of lab_list_assets with its url once the PUT is done. lab_reference_motion also takes the asset_key as reference_video_url, and an image's asset_key can become a character's reference view (lab_referenz_aus_bild with project_id + asset_key). Exception: in projects that check images, an uploaded image is not in the project after the PUT — the answer then carries abschluss_noetig and an abschluss_key; after the PUT call lab_add_media again with the same project_id, art, herkunft and abschluss_key only. That call checks the image and returns the asset_key, or says why it was refused. Free. Internal addresses are refused.

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": {
      "project_id": "<project_id>",
      "art": "<art>",
      "herkunft": "<herkunft>"
    },
    "name": "lab_add_media"
  }
}

Input Schema

NameRequiredDescriptionDefault
artYesWhat the file is
herkunftYesRequired, no default: 'eigen' = shot, recorded or made by people (no AI generation); 'ki' = generated or altered with AI. Decides the EU AI Act Art. 50 disclosure of every export that uses this file. If the file itself carries an AI mark (C2PA or IPTC source type), it stays AI material whatever you declare, and the answer says so.
file_nameNoName of a local file to upload, with extension. Give this OR media_url
media_urlNoPublic http(s) URL of the file. Give this OR file_name
project_idYesProject id (from lab_list_projects) — positive integer as string
content_typeNoMedia type of the upload, e.g. video/mp4, audio/mpeg — required with file_name
abschluss_keyNoOnly after an upload whose answer said `abschluss_noetig`: the `abschluss_key` from that answer, given AFTER the PUT returned 200. Give it instead of media_url and file_name

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / additionalProperties
      Added value: +false
  2. Changed1 schema field changed
    • addedInput schema / properties / abschluss_key
      Added value: +{
      +  "description": "Only after an upload whose answer said `abschluss_noetig`: the `abschluss_key` from that answer, given AFTER the PUT returned 200. Give it instead of media_url and file_name",
      +  "maxLength": 300,
      +  "minLength": 1,
      +  "type": "string"
      +}
  3. Changed2 schema fields changed
    • addedInput schema / properties / herkunft
      Added value: +{
      +  "description": "Required, no default: 'eigen' = shot, recorded or made by people (no AI generation); 'ki' = generated or altered with AI. Decides the EU AI Act Art. 50 disclosure of every export that uses this file. If the file itself carries an AI mark (C2PA or IPTC source type), it stays AI material whatever you declare, and the answer says so.",
      +  "enum": [
      +    "eigen",
      +    "ki"
      +  ],
      +  "type": "string"
      +}
    • changedInput schema / required
      Previous value: -[
      -  "project_id",
      -  "art"
      -]New value: +[
      +  "project_id",
      +  "art",
      +  "herkunft"
      +]
  4. Added

TDQS

A4.6/5.0
Behavior4/5

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

Annotations only declare readOnlyHint=false and destructiveHint=false; the description adds substantial behavior beyond that: 100 MB cap, one-hour signed URL validity, mandatory exact headers with a 403 on omission, refusal of internal addresses, and the two-step abschluss_key flow for image-checking projects. The only gap is that it doesn't state what happens on a failed PUT or whether a partial upload is cleaned up, which keeps it from a 5.

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-loaded with the core purpose and the two modes, and nearly every sentence carries operational detail. It is a single dense paragraph, though, and the exception flow at the end would be easier to parse as a separate clause or list; the German field names (anleitung, abschluss_noetig) also add parsing load.

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 multi-step upload tool with no output schema, the description covers the full lifecycle: obtaining the asset_key, the signed PUT, the 24 h url, the asset appearing in lab_list_assets, and the conditional second call. Nothing an agent needs to complete the flow correctly 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 real meaning: media_url must be a public http(s) address the server fetches, file_name pairs with content_type, and abschluss_key is only valid after a PUT returned 200. These pairing and sequencing constraints are not obvious from the schema alone.

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 ('Bring your own video, audio or image into a project') and immediately distinguishes it from generated media ('not generated, yours'). An agent can tell this apart from lab_add_clip or lab_create_project 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?

Explicitly lays out the two mutually exclusive input modes (media_url vs file_name + content_type) and the condition that selects each. It also names the downstream consumers (lab_timeline_apply, lab_reference_motion, lab_referenz_aus_bild) and the exact re-invocation path for the image-check exception, so the agent knows when and how to call it.

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