Skip to main content
Glama
plemio

Nano Banana MCP Server

by plemio

Upload file to Gemini Files API

upload_file

Upload a local file to the Gemini Files API and get its URI and metadata for use in image generation prompts, ideal for files over 20MB or repeated use.

Instructions

Upload a local file through the Gemini Files API and return its URI & metadata. Useful when the image is larger than 20MB or reused across prompts.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYesServer-accessible file path to upload to Gemini Files API.
display_nameNoOptional display name for the uploaded file.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4/5.0
Behavior3/5

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

Annotations are minimal (readOnlyHint=false, openWorldHint=true), so the description carries most of the disclosure burden. It adds useful context: the upload destination (Gemini Files API), the return value (URI & metadata), and the 20MB size threshold. However, it does not disclose side effects of an upload operation — persistence, storage quota, retention/deletion, or whether files can be cleaned up. Given the mutation nature, this is a notable gap but not severe.

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 sentences with zero waste. The first sentence front-loads the action and outcome; the second provides a concrete usage criterion. Every clause earns its place.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple 2-parameter tool with 100% schema coverage, the description covers the essentials: action, return value, and when to use it. What is missing is minor but real — there is no output schema, so the agent only knows the return is 'URI & metadata' without structure, and no failure modes or file-type constraints are mentioned. Still, an agent can correctly invoke this tool with the information given.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so both parameters (path, display_name) are already fully documented. Per baseline, a 3 is appropriate. The description's mention of 'return its URI & metadata' and the 20MB threshold adds context about tool behavior but does not add parameter-level meaning beyond what the schema already provides.

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 states a specific verb+resource+outcome: 'Upload a local file through the Gemini Files API and return its URI & metadata.' This is unambiguous and easily distinguished from the sibling tools (generate_image, show_output_stats, maintenance), none of which involve file upload. The title and description align without redundancy.

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?

The description gives an explicit conditional for when to use the tool: 'Useful when the image is larger than 20MB or reused across prompts.' This gives the agent a concrete decision rule. However, it does not explicitly name an alternative or state when NOT to use it — it only implies that smaller/single-use images would use a different path.

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