Skip to main content
Glama

gemini_delete_file

Destructive

Delete an uploaded file from the Gemini Files API by providing its file_uri and confirming the action, to remove it before automatic expiry.

Instructions

Delete an uploaded file, image or photo (by file_uri) from the Gemini Files API before its ~48h expiry. Any tool call still referencing it will then fail with a generic 404, so delete only references you are finished with.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
confirmNoMust be true to proceed. Without this, the tool returns a preview.
file_uriYesThe `files/<id>` reference (or full uri) to delete
Behavior5/5

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

Annotations declare destructiveHint=true, and the description adds context: deletion causes 404 errors for other references, mentions ~48h expiry, and explains the confirm parameter's role. No contradictions.

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, front-loaded with the primary action, no unnecessary words. Efficient and clear.

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?

For a simple tool with 2 parameters and no output schema, the description fully covers purpose, usage, behavioral effects, and parameter semantics. Annotations complement well.

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 coverage is 100%, and the description reinforces the required parameter (file_uri) and clarifies the confirm parameter's behavior (preview if false). Adds slight value beyond schema by explaining the '~48h expiry' context.

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 deletes uploaded files by file_uri, and distinguishes it from sibling tools (upload, list) by specifying the deletion action and its consequence (404 for references).

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?

Explicitly warns that deleting a file will cause other tool calls referencing it to fail with 404, advising to delete only references you are finished with. Provides clear when-to-use and consequence.

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

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