Skip to main content
Glama

get_file

Retrieve file metadata from Gemini API to verify file state, check expiration, and refresh cache entries using the file URI.

Instructions

GET FILE METADATA & UPDATE CACHE - Retrieves current metadata for specific file from Gemini API and updates cache. USAGE: Pass fileUri from upload response or list_files. RETURNS: Complete file info including uri, displayName, mimeType, sizeBytes, create/update/expiration times, sha256Hash, state. Automatically adds to cache if missing. USE CASE: Verify file state, check expiration, refresh cache entry.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
fileUriYesThe file URI or name returned from upload_file
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 of behavioral disclosure. It clearly describes the tool's behavior: retrieving metadata from Gemini API, updating cache, and automatically adding to cache if missing. It mentions the return format ('Complete file info including uri, displayName...') and the caching side effect. However, it doesn't disclose potential rate limits, authentication needs, or error conditions, which would be helpful for a complete behavioral picture.

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 efficiently structured with clear sections: purpose statement, usage instructions, return details, and use cases. Every sentence adds value without redundancy. It's front-loaded with the core functionality ('GET FILE METADATA & UPDATE CACHE') and maintains appropriate length for the tool's complexity.

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 the tool has no annotations and no output schema, the description does a good job explaining what the tool does, when to use it, and what it returns. It covers the caching behavior and use cases. However, for a tool that interacts with an external API (Gemini), additional context about error handling or rate limiting would make it more complete, though the current description is substantially adequate.

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 documents the single parameter 'fileUri' with its description. The description adds minimal value beyond the schema by mentioning 'Pass fileUri from upload response or list_files', which provides context about where to obtain the parameter value. This meets the baseline of 3 when schema coverage is high.

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's purpose with specific verbs ('retrieves', 'updates') and resources ('metadata for specific file', 'cache'). It distinguishes from siblings like list_files (which lists multiple files) and upload_file (which uploads rather than retrieves). The phrase 'GET FILE METADATA & UPDATE CACHE' directly communicates the dual functionality.

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 guidance on when to use this tool: 'USE CASE: Verify file state, check expiration, refresh cache entry.' It also specifies when to use it versus alternatives by stating 'Pass fileUri from upload response or list_files', indicating it's for specific files rather than listing all files. The tool name 'get_file' versus 'list_files' further differentiates usage contexts.

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