Skip to main content
Glama

Upload Image

gemini_upload_image

Upload local images to Gemini Files API to obtain file URIs, enabling faster batch processing without base64 encoding.

Instructions

Upload one or more images to the Gemini Files API and return their file URIs.

Use this to pre-upload reference images before calling gemini_batch_submit. Uploaded files persist for 48 hours on Google's servers. Pass the returned URIs to batch_submit via the file_uris field to avoid slow base64 encoding.

Args:

  • image_paths (string, required): Comma-separated list of local file paths to upload. Example: "/path/to/ref1.jpg,/path/to/ref2.png"

Returns:

  • A list of file URIs (e.g. "files/abc123") mapped to each input path.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
image_pathsYesComma-separated list of local file paths to upload
Behavior4/5

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

Adds that files persist for 48 hours and return value is a list of URIs. Annotations don't contradict (readOnlyHint=false matches write operation). No mention of rate limits or failure modes, but context is good.

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?

Very concise: three sentences for purpose/usage, then args/returns in structured format. No superfluous text.

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 single parameter and no nested objects, the description fully explains input, behavior, and output. No output schema needed due to clear description.

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 covers 100% of parameters, and description provides an example of the comma-separated path format, which adds practical guidance beyond 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?

The description clearly states the tool uploads images to Gemini Files API and returns file URIs. It distinguishes from siblings by explicitly mentioning its use before gemini_batch_submit.

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?

Explicitly says 'Use this to pre-upload reference images before calling gemini_batch_submit' and explains benefit of avoiding base64 encoding. Lacks when-not-to-use or alternatives, but sufficient.

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/slackermafia/NanoBanana-MCP-Server'

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