Skip to main content
Glama

Upload images from the chat

upload_files

Open a card in the chat where the user picks or drops images from their computer; they go straight to a folder on the user's server, without passing through the conversation (no base64 in tokens), and the paths come back as a message from the user. Use it when the user has images they have not attached, or many of them; for one image already attached to the chat, write_file with file does the same. Say in one sentence that the card is open and wait. JPEG, PNG, GIF, WebP or AVIF, 15 MB each, up to 20 at a time; names are made lower case and safe, and a file with the same name is replaced (the earlier version is kept under /var/lib/askyourstack/backups). Changes must be open on the server, like for write_file; the card is valid for 30 minutes. Afterwards use the paths, for example in a CMS block or a product, with the tools for that site.

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": {
      "folder": "<folder>"
    },
    "name": "upload_files"
  }
}

Input Schema

NameRequiredDescriptionDefault
folderYesAbsolute folder on the server for the images (created if missing), for example /home/shop/public_html/pub/media/wysiwyg/christmas
serverNoServer name or id. Optional when the account has one server.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

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: no base64 in tokens, paths return as a user message, 30-minute card validity, formats and size/count limits, lower-cased sanitized names, and the fact that same-name files are replaced with the earlier version kept under /var/lib/askyourstack/backups. It also discloses the prerequisite that changes must be open on the server, matching the write_file pattern. The replacement behavior sits slightly in tension with destructiveHint=false, but the backup path makes it recoverable and it is explicitly disclosed.

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 core mechanic and then layers usage, limits, and follow-up, with no filler sentences. It is dense and the opening is a run-on with semicolons and parentheticals, which costs a bit of readability, but every clause carries actionable information.

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?

A two-parameter tool with no output schema, yet the description covers prerequisites (server changes open), timing (30 minutes), limits, filename handling, backup location, and how to use the returned paths downstream. An agent could call this correctly and coach the user through it from the description alone.

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; the description still adds operational meaning to the folder target by explaining images land there rather than in the conversation. It also supplies constraints the schema lacks (formats, 15 MB each, up to 20 at a time, sanitized names) that govern how a call should be prepared. The optional server parameter is left entirely to the schema.

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 ('Open a card in the chat where the user picks or drops images') plus the unusual mechanic that files bypass the conversation and land directly in a server folder. It explicitly contrasts with write_file for the already-attached single-image case, so the agent can distinguish it from siblings 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 explicit when-to-use ('images they have not attached, or many of them') and when-not ('for one image already attached to the chat, write_file with file does the same'), naming the alternative outright. It also prescribes the response to the user ('Say in one sentence that the card is open and wait') and what to do afterwards ('use the paths, for example in a CMS block or a product').

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