Skip to main content
Glama

Upload image

upload_image

Add an image to the user's library and return its file id, for use as input to generation, reference and timeline tools. Provide exactly one of imageBase64 (raw base64 or a data: URL) or imageUrl (a public https URL). Content is safety-scanned like a normal upload.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "upload_image"
  }
}

Input Schema

NameRequiredDescriptionDefault
fileNameNoOptional file name, used with imageBase64 to help detect the type.
imageUrlNoPublic https URL of an image (port 443, no credentials).
imageBase64NoBase64-encoded image bytes, or a data: URL.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.5/5.0
Behavior4/5

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

Annotations already declare it is not read-only, is open-world, and is not idempotent. The description adds useful behavioral context beyond annotations: the image is safety-scanned like a normal upload, and exactly one source input is allowed. It does not discuss failure modes or idempotency implications, but with annotations present the bar is lower.

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?

Two tightly written sentences with no wasted words. The purpose and return value are front-loaded, followed by the input exclusivity rule and the safety-scan note.

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?

For a simple upload tool with no output schema, the description covers the essential missing pieces: what is returned (file id), how it should be supplied (exactly one of two input styles), and the safety-scan behavior. The parameters are also fully documented in the schema.

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 adds a constraint not explicit in the schema: exactly one of imageBase64 or imageUrl must be supplied. It also clarifies that imageBase64 may be raw base64 or a data: URL, and that imageUrl must be a public https URL.

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?

The description uses a specific verb and resource: 'Add an image to the user's library.' It also states the return value ('its file id') and downstream uses ('generation, reference and timeline tools'), which clearly distinguishes it from siblings like generate_image or edit_image.

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?

It clearly explains the core usage requirement: provide exactly one of imageBase64 or imageUrl. The intended downstream use is stated, but it does not explicitly contrast this tool with siblings such as generate_image or create_reference when choosing how to get an image into the library.

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