Skip to main content
Glama

Upload a local file as post media

upload_media

Put a file that lives on the user's machine into durable Ignix storage and get back a stable https URL. THIS is how a photo or video on disk becomes a post, and it is also how a DOCUMENT or an AUDIO file gets a URL for a chatbot flow node: images, video, audio, and PDF, Word, Excel, CSV and ZIP documents are all accepted (documents are delivered in a DM as a link button — see get_network_rules). import_media only accepts URLs that are ALREADY public, so a local file has no other way in — do not ask the human to upload it by hand, and do not give up on the post. Default mode: call it with fileName and contentType and it returns an uploadUrl; send the bytes there yourself with an HTTP PUT (e.g. curl -X PUT -H "Content-Type: <contentType>" --upload-file "<path>" "<uploadUrl>"), then use the returned url as post media. Any file size. Only if you cannot make an HTTP request, pass the bytes inline as base64 in data (small images only: inline bytes travel through your context window). If you cannot make an HTTP request and the file is a video or anything but a small image (a web or mobile chat), this is the one case to ask the user to upload it in the Ignix web app (ignix.social, from the post composer); it then appears in list_library_media.

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": "upload_media"
  }
}

Input Schema

NameRequiredDescriptionDefault
dataNoONLY for small images when you cannot perform an HTTP PUT: the file bytes as base64 (max 4 MB decoded). Leave it empty to get an `uploadUrl` instead, which is the right way for video and for anything large.
typeNoInferred from the content type when omitted.
bytesNoSize of the file in bytes, if you know it. With it, Ignix returns an upload through its own app domain (`uploadUrl` + `uploadHeaders`, which you MUST send with the PUT) instead of a direct storage URL — that route works from networks that block the storage provider. Up to 90 MB in one PUT.
fileNameNoName of the file, used to infer the type and to label it in the library, e.g. "reel-hooks.mov".
contentTypeNoMIME type, e.g. "video/mp4", "image/jpeg", "application/pdf", "audio/mp4". Inferred from fileName when omitted.
descriptionNoOptional note stored with the asset in the library.
registerUrlNoAfter a successful PUT, pass the `url` you were given here to file the asset in the media library so the human can find and reuse it. Optional: the post works without this.
workspaceIdNoWorkspace to work on (an id from list_workspaces). Not needed when this connection is tied to one workspace, or when you pass an account: the account's workspace is used.
idempotencyKeyNoOptional. A unique id for this action (16-128 chars: letters, digits, _ : . -). If you are unsure whether a call went through (timeout, network error), repeat it with the SAME idempotencyKey and the same arguments: you get the original result and nothing is done twice.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.2/5.0
Behavior3/5

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

Annotations already establish that this is a non-read-only, non-destructive, non-idempotent write, so the safety profile is covered; the description adds genuinely useful mechanics beyond that (two-step upload handshake, no file-size ceiling, `bytes` switching to an app-domain `uploadUrl` + mandatory `uploadHeaders`, `registerUrl` being optional for the post to work). However, it does not disclose what happens to an asset uploaded but never registered, or any expiry window on `uploadUrl`, and its idempotencyKey retry promise sits awkwardly beside `idempotentHint: false` without reconciling the two. Solid added context, but not full behavioral coverage for a mutating multi-step tool.

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 action and the default mode before the edge cases, and every paragraph maps to a decision the agent has to make. It is long and repeats the "cannot make an HTTP request" condition twice (once for `data`, once for video/large files), which costs a little. Dense but not padded.

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 nine-parameter, multi-step, no-output-schema tool, the description covers the whole lifecycle: accepted types, upload handshake, where the resulting URL goes, library registration, and the escalation path when no HTTP is possible. It even supplies the return field names (`uploadUrl`, `uploadHeaders`, `url`) in lieu of an output schema. Nothing an agent needs in order to call this 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 description coverage is 100%, so every one of the nine parameters is already documented in the schema; the description's real contribution is the ordering between them (`fileName`+`contentType` → `uploadUrl` → PUT → `registerUrl`) plus a concrete curl example. It does not go beyond the schema on the trickier ones — the `bytes` size ceiling vs. "Any file size", the interaction between `type` inference and `contentType`, or the `workspaceId`/account precedence are all left to the schema text. Baseline 3 is right when the schema is doing the parameter-level work.

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 concrete verb and resource ("put a file that lives on the user's machine into durable Ignix storage and get back a stable https URL") and enumerates the accepted media classes (image, video, audio, PDF/Word/Excel/CSV/ZIP). It explicitly contrasts itself with the sibling `import_media`, which "only accepts URLs that are ALREADY public", so an agent can route between the two 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 Guidelines5/5

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

Gives an explicit default path (call with `fileName` + `contentType`, receive `uploadUrl`, PUT the bytes, use the returned `url`), an explicit fallback (`data` base64 for small images when HTTP is impossible), and an explicit last resort (ask the user to upload via the Ignix web app, after which it appears in `list_library_media`). It also names the wrong move ("do not ask the human to upload it by hand") and points to `get_network_rules` for document delivery, leaving nothing to inference.

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