Skip to main content
Glama

upload_file

Get a file into cnaps.ai so a flow can use it. Handles images, video, audio and text (png, jpg, webp, avif, RAW / mp4, mov, webm, mpeg, avi, flv, wmv, 3gp / wav, mp3, m4a, aac, ogg, flac / txt). TIFF is stored as PNG either way; HEIC (iPhone photos) only through the upload link, which stores it as JPG. Two ways in, chosen by what you pass: (1) The user gave a public HTTP/HTTPS URL → pass file_url and it is registered directly. (2) The files are on the user's machine → pass nothing, and you get back an upload link to show them; then call again with the returned token to wait for the upload and get the URLs. One link takes multiple files — up to 20 files per link, dropped together or a few at a time — so make ONE link for several files, not one per file. A link is used up once the user presses Upload. You CANNOT send bytes from the chat through MCP — even if you can see the image or video, use the link flow. Returns URLs usable in create_flow input_files or run_flow inputs.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tokenNoUpload session token from a previous upload_file call. Provide it to wait for the user's upload and retrieve the file URLs. If it returns status "uploading", the user is still transferring — call again with the same token.
file_urlNoPublic URL to download the file from (e.g., 'https://example.com/photo.png'). Omit when the user has no URL — you will get an upload link instead.
filenameNoOptional output filename for the file_url path. Defaults to the URL's filename.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / token / description
      Previous value: -"Upload session token from a previous upload_file call. Provide it to wait for the user's upload (up to 15 minutes) and retrieve the file URLs."New value: +"Upload session token from a previous upload_file call. Provide it to wait for the user's upload and retrieve the file URLs. If it returns status \"uploading\", the user is still transferring — call again with the same token."
  2. Changed4 schema fields changed
    • changedInput schema / properties / file_url / description
      Previous value: -"Public URL to download the file from (e.g., 'https://example.com/photo.png')."New value: +"Public URL to download the file from (e.g., 'https://example.com/photo.png'). Omit when the user has no URL — you will get an upload link instead."
    • changedInput schema / properties / filename / description
      Previous value: -"Optional output filename. Defaults to the URL's filename."New value: +"Optional output filename for the file_url path. Defaults to the URL's filename."
    • addedInput schema / properties / token
      Added value: +{
      +  "description": "Upload session token from a previous upload_file call. Provide it to wait for the user's upload (up to 15 minutes) and retrieve the file URLs.",
      +  "type": "string"
      +}
    • changedInput schema / required
      Previous value: -[
      -  "file_url"
      -]New value: +[]
  3. First observed

TDQS

A4.8/5.0
Behavior5/5

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

Goes well beyond the annotations: format transformations (TIFF stored as PNG, HEIC only via upload link and stored as JPG), a concurrency limit (up to 20 files per link), a lifecycle constraint (link consumed once the user presses Upload), and a state-machine detail (status 'uploading' means re-call with the same token). None of this is derivable from readOnlyHint=false / openWorldHint=true / idempotentHint=false.

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-loads the purpose and format list before the branching logic, and each sentence carries operational payload. It is dense and runs long, but little is wasted — the heaviest block (the numbered two-ways-in section) is the part an agent most needs.

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?

There is no output schema, yet the description tells the agent what comes back (a link, then URLs usable in create_flow/run_flow) and how to poll with the token. Combined with annotations and full param coverage, an agent has everything needed to invoke this correctly across both modes.

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 semantic context the schema entries don't: token drives a two-phase wait-and-retrieve flow, file_url is the URL-registration path, and the two are mutually exclusive modes. It stops short of documenting filename's interaction with the URL path beyond what the schema already says.

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+resource ('Get a file into cnaps.ai so a flow can use it'), enumerates supported media types, and names the downstream consumers (create_flow input_files, run_flow inputs). An agent can distinguish this from every sibling tool, which are all flow/model/community operations, without opening a 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 branches usage by input: public HTTP/HTTPS URL -> pass file_url; local files -> pass nothing and get a link, then re-call with the token. It also states a hard constraint ('You CANNOT send bytes from the chat through MCP — even if you can see the image or video, use the link flow') and warns against one-link-per-file, covering both when-to-use and when-not-to.

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