Skip to main content
Glama
MCP-Gemini-FileSearch

MCP-Gemini-FileSearch

by amsminn

add_document

Upload and index a document from a local path or HTTP(S) URL into Gemini file stores, with automatic URL download and SHA-256 deduplication.

Instructions

Upload and index a document from local path or URL. Supports automatic URL download and SHA-256 deduplication.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "source": "<source>"
    },
    "name": "add_document"
  }
}

Input Schema

NameRequiredDescriptionDefault
sourceYesLocal file path or HTTP(S) URL to the document to upload
metadataNoOptional document metadata

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A3.5/5.0
Behavior3/5

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

With no annotations provided, the description carries the full behavioral burden, and it does disclose two real traits: automatic URL download and SHA-256 deduplication. However, it stops short of saying what deduplication actually does on a match (skip, error, or overwrite), whether indexing is synchronous, or what permissions or side effects accompany the upload.

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 core action, and the supporting capability note follows immediately. Nothing is redundant or padded.

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 two-parameter tool with a fully documented nested metadata object and no output schema, this is close but not complete: it omits what the call returns (a document identifier?), the synchronous/asynchronous nature of indexing, and duplicate-handling outcomes, all of which an agent needs before invoking it in a workflow.

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%, including per-field documentation for the nested metadata object, so the schema already explains both parameters. The description's statement about path-or-URL sources and dedup adds only marginal meaning beyond that — baseline 3.

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?

"Upload and index a document from local path or URL" gives a specific compound verb plus resource and enumerates both accepted source forms. It is clear on its own, but it never names a sibling (e.g. create_file_store or list_documents) to distinguish when a document should be added via this route versus another store-creation path.

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

Usage Guidelines3/5

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

Usage is only implied: an agent can infer this is the tool for ingesting a single document by path or URL. There is no explicit when-to-use/when-not framing, no mention of prerequisites such as the file existing on the server filesystem, and no routing toward alternatives.

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