Skip to main content
Glama

gemini_uploadFile

Upload files to the Gemini API by specifying a local path, returning metadata with unique name and URI. Requires Google AI Studio API keys; supports optional display name and MIME type.

Instructions

Uploads a file (specified by a local path) to be used with the Gemini API. NOTE: This API is not supported on Vertex AI clients. It only works with Google AI Studio API keys. Returns metadata about the uploaded file, including its unique name and URI.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
displayNameNoOptional. A human-readable name for the file in the API. Max 100 chars.
filePathYesRequired. The full local path to the file that needs to be uploaded.
mimeTypeNoOptional. The IANA MIME type of the file (e.g., 'text/plain', 'image/jpeg'). If omitted, the server will attempt to infer it from the file extension of filePath.
Behavior3/5

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

With no annotations provided, the description carries full burden. It discloses that the tool returns metadata about the uploaded file, which is valuable behavioral information. However, it doesn't mention authentication requirements, rate limits, file size restrictions, or what happens if upload fails. For a file upload operation with zero annotation coverage, this leaves significant behavioral aspects undocumented.

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?

The description is perfectly concise with three focused sentences: purpose statement, important limitation note, and return value information. Every sentence earns its place by providing essential information without redundancy. The structure is front-loaded with the core functionality first.

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

Completeness3/5

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

For a file upload tool with no annotations and no output schema, the description provides adequate but incomplete coverage. It explains what the tool does, platform limitations, and what it returns, but lacks details about authentication, error handling, file constraints, and the specific structure of returned metadata. Given the complexity of file operations, this leaves important contextual gaps.

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 the schema already fully documents all three parameters. The description doesn't add any parameter-specific information beyond what's in the schema. It mentions 'local path' which aligns with the filePath parameter description, but this doesn't provide additional semantic value. Baseline 3 is appropriate when schema does all the parameter documentation work.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb ('Uploads') and resource ('a file') with specific context ('to be used with the Gemini API'). It distinguishes from siblings like gemini_getFile or gemini_deleteFile by focusing on upload functionality. However, it doesn't explicitly differentiate from all siblings beyond the basic upload vs. other operations distinction.

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 provides clear context about when to use this tool ('to be used with the Gemini API') and includes an important exclusion ('NOTE: This API is not supported on Vertex AI clients. It only works with Google AI Studio API keys'). This gives practical guidance about platform compatibility. However, it doesn't explicitly mention alternatives or when NOT to use it relative to sibling tools.

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

Related 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/bsmi021/mcp-gemini-server'

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