Skip to main content
Glama

list_files

Retrieve metadata for uploaded files to check availability, monitor upload status, and audit storage usage within the Gemini File API.

Instructions

LIST ALL UPLOADED FILES - Retrieves metadata for all files currently in Gemini File API (associated with API key). Updates internal cache with latest file states. RETURNS: Array of files with uri, displayName, mimeType, sizeBytes, createTime, expirationTime, state. Also shows cachedCount indicating files ready for immediate use. USAGE: Check file availability before chat, monitor upload status, audit storage usage (20GB project limit).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pageSizeNoNumber of files to return (default 10, max 100)
Behavior4/5

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

With no annotations provided, the description carries the full burden. It discloses key behaviors: 'Updates internal cache with latest file states', returns specific fields including 'cachedCount indicating files ready for immediate use', and mentions the '20GB project limit' for storage auditing. However, it doesn't cover error conditions or rate limits.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is appropriately sized and front-loaded with the core purpose. Every sentence adds value: purpose, behavior, returns, and usage guidelines. It could be slightly more structured with bullet points but remains efficient.

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?

Given no annotations and no output schema, the description does well by explaining the return structure ('Array of files with uri, displayName...') and usage context. It covers the tool's purpose, behavior, and practical applications adequately, though it lacks details on error handling or pagination beyond pageSize.

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% (pageSize parameter fully documented in schema), so baseline is 3. The description doesn't add any parameter-specific information beyond what the schema provides, but it doesn't need to compensate for gaps.

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 specific verb ('LIST ALL UPLOADED FILES', 'Retrieves metadata') and resource ('files currently in Gemini File API'), distinguishing it from siblings like get_file (single file) or delete_file (mutation). It explicitly mentions the scope ('all files associated with API key').

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

Usage Guidelines5/5

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

The description provides explicit usage scenarios: 'Check file availability before chat, monitor upload status, audit storage usage (20GB project limit)'. It distinguishes when to use this tool (for listing all files) versus alternatives like get_file for single files or cleanup_all_files for deletion.

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/mintmcqueen/gemini-mcp'

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