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.

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.8/5.0
Behavior5/5

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

Annotations only declare the safety profile (mutation, open world, non-destructive); the description adds the entire operational model — two-phase upload with uploadUrl/uploadHeaders, size ceilings (4 MB inline, 90 MB per PUT), the bytes-triggered alternate route for blocked networks, and that documents arrive as a DM link button. Far beyond what the annotations carry.

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 purpose before the routing logic, and each paragraph handles one mode. It runs long with some editorializing ('do not give up on the post') and re-explains the PUT step, but the density is largely justified for a tool with this much branching.

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?

With no output schema, the description carries return-value burden and does so: it names the returned uploadUrl, url, and uploadHeaders and explains what each is for. Combined with type support (image/video/audio/PDF/Office/ZIP) and workspace/account resolution, an agent has everything needed to call it correctly.

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 routing meaning: fileName/contentType drive the default mode, `data` is only for small images when HTTP PUT is impossible, and `bytes` silently switches to the app-domain upload route. It doesn't fully spell out every param (e.g., idempotencyKey is left to the schema), keeping it just under a 5.

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 (upload), resource (a local file), and outcome (durable storage + stable https URL). It explicitly names the sibling it is not — 'import_media only accepts URLs that are ALREADY public' — so an agent can route between them without opening schemas.

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 explicit when-to-use (turn on-disk media into post media or a chatbot-flow URL), when-not (public URLs → import_media), and a full fallback ladder: default PUT flow, base64 for small images, and last-resort manual upload only for video/large files on web/mobile chat. Nothing is left 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