gemini_listFiles
List previously uploaded files with pagination support on the MCP Gemini Server. Retrieve file metadata and a token for the next page using optional page size and token parameters.
Instructions
Lists files previously uploaded to the Gemini API. Supports pagination to handle large numbers of files. NOTE: This API is not supported on Vertex AI clients. It only works with Google AI Studio API keys. Returns a list of file metadata objects and potentially a token for the next page.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "gemini_listFiles"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| pageSize | No | Optional. The maximum number of files to return per page. Defaults to 100 if not specified by the API, max 1000. | |
| pageToken | No | Optional. A token received from a previous listFiles call to retrieve the next page of results. |