Skip to main content
Glama

upload_file

Upload a base64-encoded image to get a temporary URL for use with image processing tools. Accepts JPEG, PNG, WEBP, or GIF up to 10 MB.

Instructions

Upload a base64-encoded image to ToolSnap temporary storage and receive a short-lived URL to pass to tools like remove_background. The file is automatically deleted once consumed by a tool. Returns JSON with url (temporary), key, content_type, file_size_bytes. Returns an error if the base64 data is malformed or the content_type is not supported. Do NOT use this URL as a permanent link. Accepts JPEG, PNG, WEBP, or GIF up to 10 MB. Free — no payment required.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dataYesBase64-encoded image data (no data: URI prefix — just the raw base64 string).
content_typeYesMIME type of the image: "image/jpeg", "image/png", "image/webp", or "image/gif".
Behavior5/5

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

No annotations provided, so description carries full burden. Discloses that file is auto-deleted once consumed, returns JSON with specific fields, errors on malformed data or unsupported content_type. Full behavioral transparency.

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?

Concise, no redundant sentences. Front-loaded with main purpose. Well-structured with constraints and return info following logically.

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?

Given simplicity (2 params, no nested objects, no output schema), description covers all needed: purpose, input format, constraints, return shape, and error conditions. No gaps for an AI agent to misuse.

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%, baseline 3. Description adds extra guidance for 'data' parameter (no data: URI prefix), which adds value beyond schema. For content_type, schema already clear. Overall slight improvement.

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?

Description clearly states the tool uploads a base64-encoded image to ToolSnap temporary storage and returns a short-lived URL. It distinguishes itself from siblings like remove_background by naming the purpose (to pass to such tools). Uses specific verb and resource.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

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

When to use: when you have a base64 image needing a temporary URL for tools like remove_background. Constraints: only JPEG, PNG, WEBP, GIF up to 10 MB, free. Warns against using URL as permanent link. Lacks explicit when-not-to-use but context implies.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/icosaedro-git/toolsnap-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server