Skip to main content
Glama

Upload a local file to SpicyAPI

spicyapi_upload_file

Upload a local file from your computer to get a spicy:// URI for model input. Supports images, video, audio, and documents.

Instructions

Read a file from this computer, upload it, and return the spicy:// URI to put in a model input field. Use this whenever the user refers to a file on their machine. Images (JPEG, PNG, WebP, GIF) up to 10 MiB; MP4/WebM video and MP3/WAV audio up to 90 MiB; reference documents (PDF, Word, Excel, PowerPoint, Keynote, Pages, Numbers, TXT, Markdown) up to 90 MiB for fields such as reference_file_url. Public HTTPS media URLs need no upload at all — pass them straight to the model input when its schema accepts a URL.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYesAbsolute path to the file on this computer, as the user gave it.
contentTypeNoOnly when the file extension is missing or wrong; otherwise inferred.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.5.0

TDQS

A4.7/5.0
Behavior4/5

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

Annotations already declare the mutation/network profile (readOnlyHint=false, openWorldHint=true, idempotentHint=false), so the description's added value is the per-type size ceilings (10 MiB images, 90 MiB video/audio/documents) and the accepted format list, which tell the agent when an upload will fail. It does not say what happens to the uploaded object afterward (retention, visibility, duplicate uploads), so it stops short of 5.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded with the action and the returned URI, then constraints, then the no-upload alternative. Three dense sentences, each carrying operational information, with no filler.

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?

An output schema exists, so return-value documentation is not required, yet the description still names the returned spicy:// URI. For a two-parameter upload tool with full schema coverage and annotations, nothing an agent needs in order to invoke it correctly is missing.

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 baseline is 3; the description goes beyond it by mapping accepted formats and size limits onto the contentType enum and clarifying the intent of path ('a file on their machine'). The contentType inference rule itself is left to the schema, so this is additive but not exhaustive.

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 precise verb sequence (read a local file, upload it, return a spicy:// URI) and names the exact output the agent must plug into a model input field. It is unambiguous and clearly distinguishable from siblings like spicyapi_download_url_create or spicyapi_task_create.

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 trigger ('Use this whenever the user refers to a file on their machine') and an explicit when-not plus alternative path ('Public HTTPS media URLs need no upload at all — pass them straight to the model input'). That is exactly the routing information an agent needs against sibling tools.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.