Skip to main content
Glama

Add a file

add_media_file
Destructive

Puts a file sent in this call on a link the person made: a picture or short video as the wallpaper, a song, or a voiceover. For a file this AI app has in hand; a file only on the person's phone can't be sent this way. The file goes in as base64, up to 28,000,000 characters, so a file of about 20MB at most through this call. LFG checks it like any upload, replaces what that slot had, and adds it to the person's uploads. What each takes. Wallpaper: a square (1:1) picture, about 1080 x 1080 pixels, as JPEG, PNG, WebP or GIF up to 50MB; a picture that is not square is cropped to a square. Or a square MP4 or MOV video, or a GIF that loops, up to 30 seconds and 50MB; a video needs a paid plan, a GIF does not. Song or voiceover: MP3, M4A, OGG, WAV or FLAC up to 5 minutes and 20MB.

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": {
      "id": "<id>",
      "use": "<use>",
      "content_type": "<content_type>",
      "data_base64": "<data_base64>"
    },
    "name": "add_media_file"
  }
}

Input Schema

NameRequiredDescriptionDefault
idYesThe link's id.
useYeswallpaper, song, or voiceover.
nameNoWhat to call the file in the person's library, "Soccer team anthem". When absent, the file's own title.
data_base64YesThe file itself, base64-encoded.
content_typeYesThe file's type, "audio/mpeg", "audio/wav", "image/png", "video/mp4".

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changed
    • changedInput schema / properties / id / description
      Previous value: -"The alarm's id."New value: +"The link's id."
    • removedInput schema / properties / id / format
      Removed value: -"uuid"
    • changedInput schema / properties / id / pattern
      Previous value: -"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"New value: +"^[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"
  2. First observed

TDQS

A4.5/5.0
Behavior5/5

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

Beyond the destructiveHint=true annotation, the description discloses what is destroyed ('replaces what that slot had'), the validation step ('LFG checks it like any upload'), the side effect of adding to the person's uploads, and concrete hard limits (28,000,000 base64 characters, ~20MB, 5 minutes/20MB for audio, 50MB for wallpaper). These are behavioral facts the annotations cannot convey.

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?

Purpose is front-loaded and the per-use block is clearly segmented, with almost every clause carrying a constraint. It is dense and somewhat repetitive (the 50MB and 20MB limits appear twice) and the run-on sentence structure makes it harder to scan than it needs to be.

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 a destructive, non-idempotent 5-parameter mutation with no output schema, it covers format, size, duration, aspect-ratio cropping, plan gating and slot replacement. It does not describe failure behavior (what error an oversized or wrong-format file yields) or what the call returns.

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 a 3 would be the baseline, but the description adds real meaning: the 'use' enum values are explained by a per-slot section listing required aspect ratio, formats, duration and size for wallpaper vs song vs voiceover. It also translates the 28,000,000-character cap into roughly 20MB, which the schema alone does not.

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?

The first sentence names a specific action and resource: putting a file on a link, with the uses (wallpaper, song, voiceover) enumerated. The scoping clause 'For a file this AI app has in hand; a file only on the person's phone can't be sent this way' separates it from the sibling add_media_from_url, so an agent can pick correctly without opening either 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?

It gives clear when-to-use context (files the app already holds, base64 inline) and an explicit when-not (files only on the person's phone), plus per-use eligibility rules such as video needing a paid plan. It never names the URL-based alternative outright, so routing is inferred rather than stated.

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.