MCP Gemini Server
Servidor MCP Gemini
Descripción general
Este proyecto proporciona un servidor MCP (Protocolo de Contexto de Modelo) dedicado que encapsula el SDK @google/genai . Expone las capacidades del modelo Gemini de Google como herramientas MCP estándar, lo que permite que otros LLM (como Cline) o sistemas compatibles con MCP aprovechen las funciones de Gemini como herramienta principal de backend.
Este servidor tiene como objetivo simplificar la integración con los modelos Gemini al proporcionar una interfaz consistente basada en herramientas administrada a través del estándar MCP.
Related MCP server: MCP Gemini Server
Características
Generación de núcleo: generación de texto estándar (
gemini_generateContent) y de transmisión (gemini_generateContentStream).Llamada de función: permite que los modelos Gemini soliciten la ejecución de funciones definidas por el cliente (
gemini_functionCall).Chat con estado: administra el contexto conversacional en múltiples turnos (
gemini_startChat,gemini_sendMessage,gemini_sendFunctionResult).Manejo de archivos: cargue, enumere, recupere y elimine archivos mediante la API de Gemini.
Almacenamiento en caché: cree, enumere, recupere, actualice y elimine contenido en caché para optimizar las indicaciones.
Prerrequisitos
Node.js (v18 o posterior)
Una clave API de Google AI Studio ( https://aistudio.google.com/app/apikey ).
Importante: Las API de gestión de archivos y almacenamiento en caché solo son compatibles con las claves de API de Google AI Studio y no se admiten al usar credenciales de Vertex AI. Este servidor no admite actualmente la autenticación de Vertex AI.
Instalación y configuración
Instalación mediante herrería
Para instalar Gemini Server para Claude Desktop automáticamente a través de Smithery :
npx -y @smithery/cli install @bsmi021/mcp-gemini-server --client claudeInstalación manual
Clonar/Colocar proyecto: asegúrese de que el directorio del proyecto
mcp-gemini-serversea accesible en su sistema.Instalar dependencias: navegue al directorio del proyecto en su terminal y ejecute:
npm installProyecto de compilación: Compilar el código fuente de TypeScript:
npm run buildEste comando usa el compilador TypeScript (
tsc) y envía los archivos JavaScript al directorio./dist(como se especifica enoutDirentsconfig.json). El punto de entrada principal del servidor serádist/server.js.Configurar el cliente MCP: Agregue la configuración del servidor al archivo de configuración de su cliente MCP (p. ej.,
cline_mcp_settings.jsonpara Cline/VSCode oclaude_desktop_config.jsonpara la aplicación de escritorio Claude). Reemplace/path/to/mcp-gemini-servercon la ruta real de su sistema yYOUR_API_KEYcon su clave de Google AI Studio.{ "mcpServers": { "gemini-server": { // Or your preferred name "command": "node", "args": ["/path/to/mcp-gemini-server/dist/server.js"], // Path to the compiled server entry point "env": { "GOOGLE_GEMINI_API_KEY": "YOUR_API_KEY", "GOOGLE_GEMINI_MODEL": "gemini-1.5-flash" // Optional: Set a default model }, "disabled": false, "autoApprove": [] } // ... other servers } }Reiniciar el cliente MCP: Reinicie su aplicación cliente MCP (p. ej., VS Code con la extensión Cline, Claude Desktop App) para cargar la nueva configuración del servidor. El cliente MCP gestionará el inicio y la detención del proceso del servidor.
Configuración
El servidor utiliza variables de entorno para la configuración, pasadas a través del objeto env en la configuración de MCP:
GOOGLE_GEMINI_API_KEY( Obligatorio ): Su clave API obtenida de Google AI Studio.GOOGLE_GEMINI_MODEL( Opcional ): Especifica un nombre de modelo predeterminado de Gemini (p. ej.,gemini-1.5-flash,gemini-1.0-pro). Si se configura, las herramientas que requieren un nombre de modelo (comogemini_generateContent,gemini_startChat, etc.) usarán este valor predeterminado cuando se omita el parámetromodelNameen la llamada a la herramienta. Esto simplifica las llamadas de cliente cuando se usa principalmente un modelo. Si esta variable de entorno no se configura, el parámetromodelNamese vuelve obligatorio para esas herramientas. Consulte la documentación de Google AI para conocer los nombres de modelo disponibles.
Herramientas disponibles
Este servidor proporciona las siguientes herramientas MCP. Los esquemas de parámetros se definen mediante Zod para su validación y descripción.
Nota sobre parámetros opcionales: Muchas herramientas aceptan parámetros opcionales complejos (p. ej., generationConfig , safetySettings , toolConfig , history , functionDeclarations , contents ). Estos parámetros suelen ser objetos o matrices cuya estructura refleja los tipos definidos en el SDK @google/genai subyacente. Para conocer la estructura exacta y los campos disponibles dentro de estos parámetros complejos, consulte: 1. El archivo src/tools/*Params.ts correspondiente en este proyecto. 2. La documentación oficial del SDK de Google AI JS .
Generación de núcleo
gemini_generateContentDescripción: Genera contenido de texto que no se transmite a partir de un mensaje.
Parámetros obligatorios:
prompt(cadena)Parámetros opcionales:
modelName(cadena),generationConfig(objeto),safetySettings(matriz)
gemini_generateContentStreamDescripción: Genera contenido de texto mediante streaming. (Nota: La implementación actual utiliza una solución alternativa y recopila todos los fragmentos antes de devolver el texto completo).
Parámetros obligatorios:
prompt(cadena)Parámetros opcionales:
modelName(cadena),generationConfig(objeto),safetySettings(matriz)
Llamada de función
gemini_functionCallDescripción: Envía un mensaje y declaraciones de funciones al modelo, devolviendo una respuesta de texto o un objeto de llamada de función solicitado (como una cadena JSON).
Parámetros obligatorios:
prompt(cadena),functionDeclarations(matriz)Parámetros opcionales:
modelName(cadena),generationConfig(objeto),safetySettings(matriz),toolConfig(objeto)
Chat con estado
gemini_startChatDescripción: Inicia una nueva sesión de chat con estado y devuelve un
sessionIdúnico.\n * Parámetros obligatorios: NingunoParámetros opcionales:
modelName(cadena),history(matriz),tools(matriz),generationConfig(objeto),safetySettings(matriz)
gemini_sendMessageDescripción: Envía un mensaje dentro de una sesión de chat existente.\n * Parámetros obligatorios:
sessionId(cadena),message(cadena)Parámetros opcionales:
generationConfig(objeto),safetySettings(matriz),tools(matriz),toolConfig(objeto)
gemini_sendFunctionResultDescripción: Envía el resultado de la ejecución de una función a una sesión de chat.\n * Parámetros obligatorios:
sessionId(cadena),functionResponses(matriz)Parámetros opcionales:
generationConfig(objeto),safetySettings(matriz)
Manejo de archivos (se requiere clave de Google AI Studio)
gemini_uploadFileDescripción: Carga un archivo desde una ruta local.\n Parámetros obligatorios:
filePath(cadena - debe ser una ruta absoluta )\n Parámetros opcionales:displayName(cadena),mimeType(cadena)
gemini_listFilesDescripción: Enumera los archivos cargados previamente.\n * Parámetros obligatorios: Ninguno
Parámetros opcionales:
pageSize(número),pageToken(cadena; nota: es posible quepageTokenno se devuelva de forma confiable actualmente).
gemini_getFileDescripción: Recupera metadatos para un archivo cargado específico.\n * Parámetros requeridos:
fileName(cadena - p. ej.,files/abc123xyz)
gemini_deleteFileDescripción: Elimina un archivo cargado.\n * Parámetros obligatorios:
fileName(cadena, por ejemplo,files/abc123xyz)
Almacenamiento en caché (se requiere clave de Google AI Studio)
gemini_createCacheDescripción: Crea contenido en caché para modelos compatibles (por ejemplo,
gemini-1.5-flash).\n * Parámetros obligatorios:contents(matriz)Parámetros opcionales:
modelName(cadena),displayName(cadena),systemInstruction(objeto),ttl(cadena, p. ej., '3600s')
gemini_listCachesDescripción: Enumera el contenido almacenado en caché existente.\n * Parámetros obligatorios: Ninguno
Parámetros opcionales:
pageSize(número),pageToken(cadena; nota: es posible quepageTokenno se devuelva de forma confiable actualmente).
gemini_getCacheDescripción: Recupera metadatos para contenido almacenado en caché específico.\n * Parámetros obligatorios:
cacheName(cadena, por ejemplo,cachedContents/abc123xyz)
gemini_updateCacheDescripción: Actualiza los metadatos (TTL, displayName) para el contenido almacenado en caché.\n * Parámetros obligatorios:
cacheName(cadena)Parámetros opcionales:
ttl(cadena),displayName(cadena)
gemini_deleteCacheDescripción: Elimina el contenido almacenado en caché.\n * Parámetros obligatorios:
cacheName(cadena, por ejemplo,cachedContents/abc123xyz)
Ejemplos de uso
A continuación se muestran ejemplos de cómo un cliente MCP (como Cline) podría llamar a estas herramientas utilizando el formato use_mcp_tool :
Ejemplo 1: Generación de contenido simple (utilizando el modelo predeterminado)
<use_mcp_tool>
<server_name>gemini-server</server_name>
<tool_name>gemini_generateContent</tool_name>
<arguments>
{
"prompt": "Write a short poem about a rubber duck."
}
</arguments>
</use_mcp_tool>Ejemplo 2: Generación de contenido (especificando modelo y configuración)
<use_mcp_tool>
<server_name>gemini-server</server_name>
<tool_name>gemini_generateContent</tool_name>
<arguments>
{
"modelName": "gemini-1.0-pro",
"prompt": "Explain the concept of recursion in programming.",
"generationConfig": {
"temperature": 0.7,
"maxOutputTokens": 500
}
}
</arguments>
</use_mcp_tool>Ejemplo 3: Iniciar y continuar un chat
Iniciar chat:
<use_mcp_tool>
<server_name>gemini-server</server_name>
<tool_name>gemini_startChat</tool_name>
<arguments>
{}
</arguments>
</use_mcp_tool>(Suponga que la respuesta contiene sessionId: "some-uuid-123" )
Enviar mensaje:
<use_mcp_tool>
<server_name>gemini-server</server_name>
<tool_name>gemini_sendMessage</tool_name>
<arguments>
{
"sessionId": "some-uuid-123",
"message": "Hello! Can you tell me about the Gemini API?"
}
</arguments>
</use_mcp_tool>Ejemplo 4: Cargar un archivo
<use_mcp_tool>
<server_name>gemini-server</server_name>
<tool_name>gemini_uploadFile</tool_name>
<arguments>
{
"filePath": "C:\\Users\\YourUser\\Documents\\my_document.txt", // IMPORTANT: Use absolute path with escaped backslashes if needed
"displayName": "My Document"
}
</arguments>
</use_mcp_tool>Manejo de errores
El servidor intenta devolver errores estructurados utilizando el tipo McpError estándar de MCP cuando falla la ejecución de la herramienta. Este objeto suele contener:
code: un valor de enumeraciónErrorCodeque indica el tipo de error (por ejemplo,InvalidParams,InternalError,PermissionDenied,NotFound).message: Una descripción legible del error.details: (opcional) Un objeto que potencialmente contiene información más específica del error subyacente del SDK de Gemini (como motivos de bloqueo de seguridad o mensajes de error de API) para la resolución de problemas.
Escenarios de error comunes:
Clave API no válida: a menudo genera un
InternalErrorcon detalles que indican una falla de autenticación.Parámetros no válidos: da como resultado
InvalidParams(por ejemplo, campo obligatorio faltante, tipo de datos incorrecto).Bloqueos de seguridad: pueden generar un
InternalErrorcon detalles que indicanSAFETYcomo el motivo del bloqueo o el motivo de finalización.Archivo/caché no encontrado: puede generar
NotFoundoInternalErrorsegún cómo el SDK muestre el error.Límites de velocidad: puede resultar en
ResourceExhaustedoInternalError.
Consulte los campos message y details del McpError devuelto para obtener pistas específicas a la hora de solucionar problemas.
Desarrollo
Este servidor sigue la estructura estándar de servidor MCP descrita en las .clinerules del proyecto y la documentación interna. Los patrones clave incluyen:
Capa de servicio (
src/services): encapsula las interacciones con el SDK@google/genai, manteniéndolo desacoplado de las particularidades de MCP.Capa de herramientas (
src/tools): adapta la funcionalidad de la capa de servicio a las herramientas MCP, manejando el mapeo de parámetros y la traducción de errores.Esquemas Zod (
src/tools/*Params.ts): se utilizan ampliamente para definir parámetros de herramientas, proporcionar validación y generar descripciones detalladas cruciales para la interacción LLM.Configuración (
src/config): Gestión centralizada medianteConfigurationManager.Tipos (
src/types): borra las definiciones de TypeScript.
Problemas conocidos
gemini_generateContentStreamutiliza una solución alternativa: recopila todos los fragmentos antes de devolver el texto completo. La transmisión real al cliente MCP aún no está implementada.Es posible que
gemini_listFilesygemini_listCachesno devuelvannextPageTokende manera confiable debido a limitaciones en la iteración del objeto Pager del SDK.gemini_uploadFilerequiere rutas de archivos absolutas cuando se ejecuta desde el entorno del servidor.Las API de almacenamiento en caché y manejo de archivos no son compatibles con Vertex AI , solo las claves API de Google AI Studio.
Available Tools
16 toolsexampleToolB
An example tool that takes a name and returns a greeting message. Demonstrates the basic structure of an MCP tool using Zod for parameter definition.
| Name | Required | Description | Default |
|---|---|---|---|
| language | No | Optional language code for the greeting (e.g., 'en', 'es', 'fr'). Defaults to 'en' if not provided or invalid. | |
| name | Yes | The name to include in the greeting message. Required, 1-50 characters. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries full burden. It states the tool returns a greeting message, but doesn't disclose behavioral traits like error handling, rate limits, authentication needs, or what happens with invalid inputs. The description adds minimal context beyond the basic operation.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two sentences, zero waste. The first sentence states the purpose clearly, and the second provides meta-context about being an example. Every sentence earns its place with no redundancy.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's low complexity (simple greeting generator), no annotations, no output schema, and high schema coverage, the description is adequate but minimal. It covers the basic operation but lacks details on return format or error behavior that would be helpful for an agent.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
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 both parameters thoroughly. The description adds no parameter-specific information beyond what's in the schema, meeting the baseline for high coverage without extra value.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states what the tool does ('takes a name and returns a greeting message') with a specific verb ('returns') and resource ('greeting message'). It distinguishes from sibling tools by being a simple greeting generator rather than Gemini-related operations, though it doesn't explicitly contrast with siblings.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance on when to use this tool versus alternatives is provided. The description mentions it 'demonstrates the basic structure of an MCP tool,' which implies educational/example usage, but doesn't specify practical contexts or exclusions.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
gemini_createCacheA
Creates a cached content resource for a compatible Gemini model. Caching can reduce latency and costs for prompts that are reused often. NOTE: Caching is only supported for specific models (e.g., gemini-1.5-flash, gemini-1.5-pro). Returns metadata about the created cache.
| Name | Required | Description | Default |
|---|---|---|---|
| contents | Yes | Required. The content to cache, matching the SDK's Content structure (an array of Parts). | |
| displayName | No | Optional. A human-readable name for the cache. | |
| model | No | Optional. The name/ID of the model compatible with caching (e.g., 'gemini-1.5-flash'). If omitted, the server's default model (from GOOGLE_GEMINI_MODEL env var) will be used. | |
| systemInstruction | No | Optional. System instructions to associate with the cache. | |
| ttl | No | Optional. Time-to-live for the cache as a duration string (e.g., '3600s' for 1 hour). Max 48 hours. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden. It discloses that the tool creates a resource (implying a write operation) and returns metadata, which is useful. However, it lacks details on permissions, error conditions, rate limits, or whether the operation is idempotent. For a creation tool with zero annotation coverage, this leaves significant behavioral gaps.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is front-loaded with the core purpose, followed by benefits and constraints, and ends with the return value. All three sentences earn their place: the first defines the tool, the second explains why to use it, and the third adds critical limitations and output information. No wasted words.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the complexity (creation tool with 5 parameters, no annotations, no output schema), the description is reasonably complete. It covers purpose, benefits, model constraints, and return value. However, it lacks details on authentication, error handling, or the structure of returned metadata, which could be important for a creation operation.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
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 all 5 parameters thoroughly. The description does not add any parameter-specific information beyond what the schema provides, such as examples or usage tips. The baseline score of 3 reflects adequate coverage by the schema alone.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's purpose: 'Creates a cached content resource for a compatible Gemini model.' It specifies the verb ('creates'), resource ('cached content resource'), and target ('compatible Gemini model'). It distinguishes from siblings like gemini_updateCache (updates), gemini_getCache (retrieves), and gemini_listCaches (lists).
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides clear context for when to use this tool: 'Caching can reduce latency and costs for prompts that are reused often.' It also specifies constraints: 'Caching is only supported for specific models (e.g., gemini-1.5-flash, gemini-1.5-pro).' However, it does not explicitly mention when NOT to use it or name specific alternatives among siblings, such as gemini_generateContent for non-cached generation.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
gemini_deleteCacheA
Deletes a specific cached content resource. Requires the unique cache name (e.g., 'cachedContents/abc123xyz'). Returns a success confirmation.
| Name | Required | Description | Default |
|---|---|---|---|
| cacheName | Yes | Required. The unique name/ID of the cache to delete (e.g., 'cachedContents/abc123xyz'). |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden. It clearly indicates this is a destructive operation ('Deletes') and specifies the required parameter format, but doesn't mention authentication requirements, rate limits, error conditions, or what happens if the cache doesn't exist. It provides basic behavioral context but lacks comprehensive disclosure.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is perfectly concise with three focused sentences that each earn their place: states the action, specifies the required input, and describes the output. No wasted words, and the information is front-loaded with the core purpose first.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a destructive operation with no annotations and no output schema, the description provides adequate but minimal context. It covers the basic purpose, parameter requirement, and expected return, but doesn't address important considerations like error handling, permissions, or side effects that would be valuable for a deletion tool.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so the schema already fully documents the single parameter. The description adds minimal value by restating the parameter requirement and providing the same example format ('cachedContents/abc123xyz') that's already in the schema. It doesn't add meaningful semantic context beyond what the structured schema provides.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the specific action ('Deletes') and target resource ('a specific cached content resource'), distinguishing it from siblings like gemini_getCache (read) and gemini_updateCache (modify). It provides a precise verb+resource combination that leaves no ambiguity about the tool's function.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides clear context about when to use this tool by specifying it requires 'the unique cache name' and mentioning the expected resource format. However, it doesn't explicitly state when NOT to use it or name specific alternatives like gemini_listCaches for discovery or gemini_updateCache for modification.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
gemini_deleteFileA
Deletes a specific file previously uploaded to the Gemini API. NOTE: This API is not supported on Vertex AI clients. It only works with Google AI Studio API keys. Requires the unique file name (e.g., 'files/abc123xyz'). Returns a success confirmation.
| Name | Required | Description | Default |
|---|---|---|---|
| fileName | Yes | Required. The unique name/ID of the file to delete (e.g., 'files/abc123xyz'). |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden. It effectively discloses key behavioral traits: it's a destructive operation ('Deletes'), requires specific authentication (Google AI Studio API keys), has platform limitations (not Vertex AI), and returns a success confirmation. This covers safety, auth needs, and output expectations well.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Three sentences with zero waste: first states purpose, second provides critical usage constraints, third clarifies return value. Each sentence adds essential information, and the structure is front-loaded with the core action.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a destructive tool with no annotations and no output schema, the description is quite complete—covering purpose, constraints, auth, and return. It could slightly improve by mentioning irreversible deletion or error cases, but it's largely adequate given the simple single-parameter schema.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so the schema already fully documents the single parameter (fileName). The description repeats the parameter example ('files/abc123xyz') but adds no additional meaning beyond what's in the schema. This meets the baseline for high schema coverage.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the specific action ('Deletes') and resource ('a specific file previously uploaded to the Gemini API'), distinguishing it from siblings like gemini_getFile (read) and gemini_uploadFile (create). It precisely defines the operation's scope and target.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides clear context with the NOTE about API support limitations (not Vertex AI, only Google AI Studio), which helps determine when to use it. However, it lacks explicit guidance on when to choose this over alternatives like gemini_deleteCache or when not to use it (e.g., for non-file resources).
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
gemini_functionCallA
Generates content using a specified Google Gemini model, enabling the model to request execution of predefined functions. This tool accepts function declarations and returns either the standard text response OR the details of a function call requested by the model. NOTE: This tool only returns the request for a function call; it does not execute the function itself.
| Name | Required | Description | Default |
|---|---|---|---|
| functionDeclarations | Yes | Required. An array of function declarations (schemas) that the model can choose to call based on the prompt. | |
| generationConfig | No | Optional configuration for controlling the generation process. | |
| modelName | No | Optional. The name of the Gemini model to use (e.g., 'gemini-1.5-flash'). If omitted, the server's default model (from GOOGLE_GEMINI_MODEL env var) will be used. | |
| prompt | Yes | Required. The text prompt to send to the Gemini model. | |
| safetySettings | No | ||
| toolConfig | No | Optional configuration for tools, specifically function calling. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries full burden for behavioral disclosure. It does disclose key behavioral traits: the tool returns either text responses OR function call requests (not both), and it only returns function call requests without executing them. However, it doesn't mention other important behaviors like rate limits, authentication needs, error handling, or response formats. The description adds some value but leaves significant gaps for a complex tool.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is extremely concise and well-structured: 4 sentences total, with the first stating the core purpose, the second explaining input/output behavior, and the final two providing crucial behavioral clarification about function call requests. Every sentence earns its place, and key information is front-loaded. No wasted words or redundancy.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's complexity (6 parameters, nested objects, no output schema, no annotations), the description is incomplete. While it covers the core purpose and key behavioral distinction about function call requests, it doesn't explain the tool's role in a larger workflow, how to handle the returned function call requests, or what the response structure looks like. For a function-calling tool with no output schema, more context about expected outputs would be helpful.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 83% (high), so the baseline is 3. The description doesn't add any parameter-specific information beyond what's in the schema - it mentions 'function declarations' and 'prompt' generically but provides no additional syntax, format, or usage details. The schema already thoroughly documents all 6 parameters with good descriptions, so the description adds no meaningful parameter semantics.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's purpose: 'Generates content using a specified Google Gemini model, enabling the model to request execution of predefined functions.' It specifies the verb ('generates content'), resource ('Google Gemini model'), and key capability ('enabling function call requests'). However, it doesn't explicitly differentiate from sibling tools like 'gemini_generateContent' or 'gemini_sendMessage' beyond mentioning function calling.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides some implied usage context by stating 'This tool only returns the *request* for a function call; it does not execute the function itself,' which helps distinguish it from execution tools. However, it doesn't explicitly state when to use this vs. alternatives like 'gemini_generateContent' (no function calling) or 'gemini_sendFunctionResult' (handles function results). No explicit when-not-to-use guidance or named alternatives are provided.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
gemini_generateContentA
Generates non-streaming text content using a specified Google Gemini model. This tool takes a text prompt and returns the complete generated response from the model. It's suitable for single-turn generation tasks where the full response is needed at once. Optional parameters allow control over generation (temperature, max tokens, etc.) and safety settings.
| Name | Required | Description | Default |
|---|---|---|---|
| generationConfig | No | Optional configuration for controlling the generation process. | |
| modelName | No | Optional. The name of the Gemini model to use (e.g., 'gemini-1.5-flash'). If omitted, the server's default model (from GOOGLE_GEMINI_MODEL env var) will be used. | |
| prompt | Yes | Required. The text prompt to send to the Gemini model for content generation. | |
| safetySettings | No | Optional. A list of safety settings to apply, overriding default model safety settings. Each setting specifies a harm category and a blocking threshold. |
TDQS
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 states this is a 'non-streaming' generation tool that 'returns the complete generated response,' which covers the basic operation mode. However, it doesn't mention important behavioral aspects like rate limits, authentication requirements, error conditions, or response format details that would be crucial for an AI agent.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is perfectly structured with four focused sentences: purpose statement, input/output behavior, usage context, and parameter overview. Every sentence earns its place with zero wasted words, and the most important information (what the tool does) is front-loaded.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a content generation tool with no annotations and no output schema, the description provides adequate basic information about purpose and usage context. However, it lacks details about the response format, error handling, and operational constraints that would be important for an AI agent to use this tool effectively in production scenarios.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The schema description coverage is 100%, so the schema already documents all parameters thoroughly. The description mentions 'Optional parameters allow control over generation (temperature, max tokens, etc.) and safety settings,' which adds some high-level context about parameter categories but doesn't provide additional semantic meaning beyond what's in the detailed schema descriptions.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the specific action ('Generates non-streaming text content'), resource ('using a specified Google Gemini model'), and scope ('single-turn generation tasks where the full response is needed at once'). It effectively distinguishes from sibling tools like 'gemini_generateContentStream' (streaming) and 'gemini_sendMessage' (chat context).
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides clear context about when to use this tool ('suitable for single-turn generation tasks where the full response is needed at once'), which implicitly distinguishes it from streaming and chat-based alternatives. However, it doesn't explicitly name when NOT to use it or mention specific sibling alternatives by name.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
gemini_generateContentStreamA
Generates text content as a stream using a specified Google Gemini model. This tool takes a text prompt and streams back chunks of the generated response as they become available. It's suitable for interactive use cases or handling long responses. Optional parameters allow control over generation and safety settings.
| Name | Required | Description | Default |
|---|---|---|---|
| generationConfig | No | Optional configuration for controlling the generation process. | |
| modelName | No | Optional. The name of the Gemini model to use (e.g., 'gemini-1.5-flash'). If omitted, the server's default model (from GOOGLE_GEMINI_MODEL env var) will be used. | |
| prompt | Yes | Required. The text prompt to send to the Gemini model for content generation. | |
| safetySettings | No | Optional. A list of safety settings to apply, overriding default model safety settings. |
TDQS
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 mentions the streaming nature and suitability for interactive/long responses, which adds useful context beyond basic function. However, it doesn't cover critical behavioral aspects like rate limits, authentication needs, error handling, or what the stream output format looks like, leaving significant gaps for a tool with no annotation coverage.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is perfectly concise with four sentences that each earn their place: stating the core function, explaining the streaming behavior, describing use cases, and noting parameter control. It's front-loaded with the essential purpose and wastes no words.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's complexity (streaming AI generation with multiple optional parameters), no annotations, and no output schema, the description is incomplete. While it covers the basic purpose and streaming nature, it lacks details on output format, error conditions, rate limits, and authentication requirements that would be needed for full contextual understanding.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
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 all 4 parameters thoroughly. The description mentions 'optional parameters allow control over generation and safety settings,' which adds minimal semantic context about parameter purposes but doesn't provide significant value beyond what's in the schema. This meets the baseline for high schema coverage.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool 'generates text content as a stream using a specified Google Gemini model' with a text prompt, which is a specific verb+resource combination. However, it doesn't explicitly distinguish this streaming tool from its sibling 'gemini_generateContent' (non-streaming version), which is a missed opportunity for full sibling differentiation.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides implied usage guidance by stating it's 'suitable for interactive use cases or handling long responses,' which suggests when streaming is beneficial. However, it doesn't explicitly state when to use this tool versus the non-streaming 'gemini_generateContent' sibling or mention any prerequisites or exclusions, leaving the guidance incomplete.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
gemini_getCacheB
Retrieves metadata for a specific cached content resource. Requires the unique cache name (e.g., 'cachedContents/abc123xyz').
| Name | Required | Description | Default |
|---|---|---|---|
| cacheName | Yes | Required. The unique name/ID of the cache to retrieve metadata for (e.g., 'cachedContents/abc123xyz'). |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the tool 'Retrieves metadata,' which implies a read-only operation, but doesn't clarify if this requires authentication, has rate limits, what the metadata includes, or any side effects. For a tool with no annotation coverage, this leaves significant behavioral gaps.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is extremely concise and front-loaded, consisting of only two sentences that directly state the purpose and parameter requirement. Every sentence earns its place with no wasted words, making it efficient and easy to parse.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's low complexity (1 parameter, no output schema, no annotations), the description is minimally adequate. It covers the basic purpose and parameter need but lacks details on behavioral traits, output format, or sibling differentiation. For a simple retrieval tool, it's passable but could be more informative to fully guide an agent.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The schema description coverage is 100%, with the parameter 'cacheName' fully documented in the schema (including description, pattern, and requirements). The description adds minimal value by repeating the parameter requirement and providing an example, but doesn't offer additional semantic context beyond what's already in the structured schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
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 a specific verb ('Retrieves') and resource ('metadata for a specific cached content resource'), making it immediately understandable. However, it doesn't explicitly differentiate from its sibling 'gemini_listCaches' (which likely lists multiple caches vs. retrieving metadata for one), missing full sibling distinction.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies usage by specifying the required parameter ('Requires the unique cache name'), which suggests when to use it (when you have a specific cache ID). However, it doesn't provide explicit guidance on when to choose this tool over alternatives like 'gemini_listCaches' or 'gemini_updateCache', nor does it mention any prerequisites or exclusions.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
gemini_getFileB
Retrieves metadata for a specific file previously uploaded to the Gemini API. NOTE: This API is not supported on Vertex AI clients. It only works with Google AI Studio API keys. Requires the unique file name (e.g., 'files/abc123xyz').
| Name | Required | Description | Default |
|---|---|---|---|
| fileName | Yes | Required. The unique name/ID of the file to retrieve metadata for (e.g., 'files/abc123xyz'). |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden. It mentions the client restriction (not supported on Vertex AI) which is useful behavioral context, but it doesn't disclose other traits like whether this is a read-only operation, potential rate limits, authentication needs beyond the API key mention, or what the metadata includes. For a tool with zero annotation coverage, this leaves significant gaps.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is appropriately sized with three concise sentences. The first sentence states the core purpose, the second provides critical behavioral context (client restriction), and the third clarifies parameter usage. Every sentence earns its place with no wasted words.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the simple single parameter with full schema coverage and no output schema, the description is reasonably complete for a basic retrieval operation. However, without annotations and with sibling tools available, it could better address differentiation and provide more behavioral context about what metadata is returned and any limitations.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so the schema already fully documents the single parameter (fileName). The description adds minimal value by restating the parameter requirement and example format, but doesn't provide additional semantics beyond what's in the schema. This meets the baseline for high schema coverage.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the verb ('Retrieves') and resource ('metadata for a specific file previously uploaded to the Gemini API'), making the purpose unambiguous. However, it doesn't explicitly differentiate from sibling tools like gemini_listFiles or gemini_uploadFile, which would be needed for a perfect score.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides some context about when to use it (for retrieving metadata of a previously uploaded file) and includes a warning about unsupported clients, but it doesn't explicitly state when NOT to use it or mention alternatives like gemini_listFiles for listing files instead of getting metadata for a specific one. The guidance is implied rather than explicit.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
gemini_listCachesB
Lists cached content resources available for the project. Supports pagination. Returns a list of cache metadata objects and potentially a token for the next page.
| Name | Required | Description | Default |
|---|---|---|---|
| pageSize | No | Optional. The maximum number of caches to return per page. Defaults to 100 if not specified by the API, max 1000. | |
| pageToken | No | Optional. A token received from a previous listCaches call to retrieve the next page of results. |
TDQS
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 pagination support and the return format (list of cache metadata objects with potential next page token), which are useful behavioral traits. However, it lacks details on permissions, rate limits, or error handling, which are important for a list operation.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is front-loaded with the core purpose in the first sentence, followed by concise details on pagination and return values in two additional sentences. Every sentence adds value without redundancy, making it efficient and well-structured.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a list tool with no annotations and no output schema, the description covers the basic operation, pagination, and return format adequately. However, it lacks details on authentication, error cases, or how to interpret the cache metadata objects, which could be helpful given the tool's complexity and lack of structured output schema.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema has 100% description coverage, so the schema fully documents the two parameters (pageSize and pageToken). The description adds no additional parameter semantics beyond what's in the schema, meeting the baseline score of 3 for high schema coverage.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the verb ('Lists') and resource ('cached content resources available for the project'), making the purpose understandable. However, it doesn't explicitly differentiate from sibling tools like gemini_listFiles, which lists files rather than caches, leaving room for slight ambiguity.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance is provided on when to use this tool versus alternatives like gemini_getCache (for a specific cache) or gemini_listFiles (for listing files). The description only states what it does, not when it's appropriate, leaving the agent to infer usage from context.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
gemini_listFilesA
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.
| 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. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries full burden and adds valuable behavioral context: it discloses pagination support, API compatibility constraints (not supported on Vertex AI, only Google AI Studio), and return format (list of metadata objects with potential next page token). This goes beyond the input schema, though it could detail error handling 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.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is front-loaded with the core purpose, followed by supporting details in clear, efficient sentences. Each sentence adds value: pagination support, API constraints, and return information. There is no wasted text, making it highly concise and well-structured.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
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 compensates well by explaining return values (list of metadata objects with next page token) and behavioral constraints. It covers key aspects for a list operation, though it could improve by detailing error cases or authentication needs, keeping it from a perfect score.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so the input schema fully documents parameters. The description does not add meaning beyond the schema, as it mentions pagination generally but not specific parameter roles. Baseline score of 3 is appropriate since the schema handles parameter documentation adequately.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the action ('Lists files') and resource ('previously uploaded to the Gemini API'), making the purpose immediately understandable. It distinguishes from siblings like gemini_getFile (retrieves specific file) and gemini_uploadFile (uploads new files), though not explicitly named. The description lacks explicit sibling differentiation, preventing a perfect score.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies usage for listing uploaded files and mentions pagination for large datasets, providing some context. However, it does not explicitly state when to use this tool versus alternatives like gemini_listCaches or gemini_getFile, nor does it provide exclusions or prerequisites beyond the Vertex AI note. This leaves gaps in guidance.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
gemini_sendFunctionResultB
Sends the result(s) of function execution(s) back to an existing Gemini chat session, identified by its sessionId. Returns the model's subsequent response.
| Name | Required | Description | Default |
|---|---|---|---|
| functionResponses | Yes | Required. An array containing the results of the function calls executed by the client. Each item must include the function 'name' and its 'response' object. | |
| generationConfig | No | Optional. Per-request generation configuration settings to override session defaults for this turn. | |
| safetySettings | No | Optional. Per-request safety settings to override session defaults for this turn. | |
| sessionId | Yes | Required. The unique identifier of the chat session. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden of behavioral disclosure. While it mentions that the tool 'Returns the model's subsequent response,' it lacks critical behavioral details such as whether this is a read-only or mutating operation, what happens if the sessionId is invalid, if there are rate limits, authentication requirements, or error handling. For a tool with no annotation coverage, this leaves significant gaps in understanding its behavior.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, well-structured sentence that efficiently conveys the core purpose and outcome. It front-loads the key action and resource, with no redundant or unnecessary information. Every word serves a clear purpose, making it highly concise and effective.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the complexity (4 parameters with nested objects, no output schema, and no annotations), the description is insufficient. It lacks details on behavioral traits, error conditions, and the structure of the returned 'model's subsequent response.' For a tool that interacts with chat sessions and function results, more context is needed to ensure proper usage and understanding of outcomes.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
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 all parameters thoroughly. The description adds minimal value beyond the schema by implying that functionResponses are for 'function execution(s)' and sessionId identifies 'an existing Gemini chat session,' but it doesn't provide additional context like parameter interactions or usage examples. Baseline 3 is appropriate when the schema does the heavy lifting.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the specific action ('Sends the result(s) of function execution(s) back') and the target resource ('an existing Gemini chat session, identified by its sessionId'). It distinguishes itself from sibling tools like gemini_sendMessage or gemini_functionCall by focusing specifically on returning function execution results rather than general messages or initiating function calls.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies usage context by mentioning 'existing Gemini chat session' and 'function execution(s)', suggesting it should be used after function calls have been made. However, it doesn't explicitly state when to use this tool versus alternatives like gemini_sendMessage, nor does it mention prerequisites such as needing an active session or prior function calls. The guidance is present but incomplete.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
gemini_sendMessageA
Sends a message to an existing Gemini chat session, identified by its sessionId. Returns the model's response, which might include text or a function call request.
| Name | Required | Description | Default |
|---|---|---|---|
| generationConfig | No | Optional. Per-request generation configuration settings to override session defaults for this turn. | |
| message | Yes | Required. The text message content to send to the model. (Note: Currently only supports text input; complex Part types like images are not yet supported by this tool parameter). | |
| safetySettings | No | Optional. Per-request safety settings to override session defaults for this turn. | |
| sessionId | Yes | Required. The unique identifier of the chat session to send the message to. | |
| toolConfig | No | Optional. Per-request tool configuration, e.g., to force function calling mode. | |
| tools | No | Optional. Per-request tools definition (e.g., function declarations) to override session defaults for this turn. |
TDQS
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 that the tool sends a message and returns a response that may include text or function call requests, which is useful behavioral context. However, it lacks details on permissions, rate limits, error handling, or whether it's idempotent. For a mutation tool (sending messages likely changes session state), this is a moderate gap.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is two sentences, front-loaded with the core purpose and followed by return value details. Every word earns its place with zero waste, efficiently covering what the tool does and what to expect in response.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
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 provides basic purpose and return type (text or function call request). However, for a complex tool with 6 parameters (including nested objects) and mutation behavior, it lacks details on error cases, side effects, or response structure. It's minimally adequate but leaves gaps for an agent to use it correctly in edge cases.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
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 all 6 parameters thoroughly. The description doesn't add any parameter-specific semantics beyond implying sessionId is required and message is text-only. This meets the baseline of 3 since the schema does the heavy lifting, but no extra value is provided.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the verb ('sends') and resource ('message to an existing Gemini chat session'), specifying it requires a sessionId. It distinguishes from siblings like gemini_startChat (which creates sessions) and gemini_functionCall (which handles function responses). However, it doesn't explicitly differentiate from gemini_generateContent (which might be for one-off generation without sessions).
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies usage by mentioning 'existing Gemini chat session' and 'sessionId', suggesting it's for continuing conversations rather than starting new ones. However, it doesn't explicitly state when to use this versus alternatives like gemini_generateContent or gemini_startChat, nor does it mention prerequisites (e.g., needing a session created first).
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
gemini_startChatB
Initiates a new stateful chat session with a specified Gemini model. Returns a unique sessionId to be used in subsequent chat messages. Optionally accepts initial conversation history and session-wide generation/safety configurations.
| Name | Required | Description | Default |
|---|---|---|---|
| generationConfig | No | Optional. Session-wide generation configuration settings. | |
| history | No | Optional. An array of initial conversation turns to seed the chat session. Must alternate between 'user' and 'model' roles, starting with 'user'. | |
| modelName | No | Optional. The name of the Gemini model to use for this chat session (e.g., 'gemini-1.5-flash'). If omitted, the server's default model (from GOOGLE_GEMINI_MODEL env var) will be used. | |
| safetySettings | No | Optional. Session-wide safety settings to apply. | |
| tools | No | Optional. A list of tools (currently only supporting function declarations) the model may use during the chat session. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries full burden but lacks critical behavioral details. It mentions statefulness and returns a sessionId, but doesn't disclose session lifecycle (timeouts, persistence), authentication requirements, rate limits, error conditions, or what happens if invalid parameters are provided. For a tool that creates persistent resources, this is a significant gap.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is efficiently structured in two sentences that front-load the core purpose and key outputs, then mention optional parameters. Every phrase earns its place by conveying essential information about the tool's function and return value without redundancy or unnecessary elaboration.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a complex tool with 5 parameters, nested objects, no annotations, and no output schema, the description is insufficient. It doesn't explain the sessionId format, how to use it with sibling tools, error handling, or the implications of stateful sessions. The lack of behavioral transparency and minimal parameter guidance leaves significant gaps for an agent to use this tool effectively.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so the schema already fully documents all 5 parameters. The description adds minimal value beyond the schema by mentioning 'initial conversation history' and 'session-wide generation/safety configurations' in general terms, but doesn't provide additional semantic context about how these parameters interact or affect behavior.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the specific action ('Initiates a new stateful chat session'), identifies the resource ('with a specified Gemini model'), and distinguishes from siblings by emphasizing the stateful nature and session creation, unlike other tools that handle content generation, file operations, or cache management.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies usage context by mentioning 'subsequent chat messages' and 'session-wide' configurations, suggesting this is for starting multi-turn conversations. However, it doesn't explicitly state when to use this versus alternatives like gemini_generateContent for single-turn interactions or how it relates to gemini_sendMessage for continuing chats.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
gemini_updateCacheA
Updates metadata (TTL and/or displayName) for a specific cached content resource. Requires the unique cache name (e.g., 'cachedContents/abc123xyz'). Returns the updated cache metadata.
| Name | Required | Description | Default |
|---|---|---|---|
| cacheName | Yes | Required. The unique name/ID of the cache to update (e.g., 'cachedContents/abc123xyz'). | |
| displayName | No | Optional. The new human-readable name for the cache. Max 100 chars. | |
| ttl | No | Optional. The new time-to-live for the cache as a duration string (e.g., '3600s' for 1 hour). Max 48 hours. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries full burden. It discloses the mutation behavior ('Updates'), required input ('Requires the unique cache name'), and return value ('Returns the updated cache metadata'). However, it lacks details on permissions, error conditions, rate limits, or whether changes are reversible.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Three sentences, front-loaded with purpose, then requirements, then return value. Zero waste: every sentence provides essential information without redundancy.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a mutation tool with no annotations and no output schema, the description is adequate but has gaps. It covers purpose, required input, and return type, but lacks behavioral details like permissions, side effects, or error handling. Given the complexity (update operation), more context would be beneficial.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, providing full documentation for all 3 parameters. The description adds minimal value beyond schema: it mentions 'TTL and/or displayName' and 'unique cache name', which the schema already covers. Baseline 3 is appropriate when schema does heavy lifting.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the verb ('Updates'), resource ('metadata for a specific cached content resource'), and scope ('TTL and/or displayName'). It distinguishes from siblings like gemini_createCache (creates new), gemini_getCache (reads), and gemini_deleteCache (removes).
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides clear context: 'Requires the unique cache name' and 'Updates metadata (TTL and/or displayName)'. It implies when to use (to modify existing cache metadata) but doesn't explicitly state when NOT to use or name alternatives like gemini_createCache for new caches or gemini_getCache for reading.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
gemini_uploadFileA
Uploads a file (specified by a local path) to be used with the Gemini API. NOTE: This API is not supported on Vertex AI clients. It only works with Google AI Studio API keys. Returns metadata about the uploaded file, including its unique name and URI.
| Name | Required | Description | Default |
|---|---|---|---|
| displayName | No | Optional. A human-readable name for the file in the API. Max 100 chars. | |
| filePath | Yes | Required. The full local path to the file that needs to be uploaded. | |
| mimeType | No | Optional. The IANA MIME type of the file (e.g., 'text/plain', 'image/jpeg'). If omitted, the server will attempt to infer it from the file extension of filePath. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries full burden. It discloses that the tool returns metadata about the uploaded file, which is valuable behavioral information. However, it doesn't mention authentication requirements, rate limits, file size restrictions, or what happens if upload fails. For a file upload operation with zero annotation coverage, this leaves significant behavioral aspects undocumented.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is perfectly concise with three focused sentences: purpose statement, important limitation note, and return value information. Every sentence earns its place by providing essential information without redundancy. The structure is front-loaded with the core functionality first.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a file upload tool with no annotations and no output schema, the description provides adequate but incomplete coverage. It explains what the tool does, platform limitations, and what it returns, but lacks details about authentication, error handling, file constraints, and the specific structure of returned metadata. Given the complexity of file operations, this leaves important contextual gaps.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so the schema already fully documents all three parameters. The description doesn't add any parameter-specific information beyond what's in the schema. It mentions 'local path' which aligns with the filePath parameter description, but this doesn't provide additional semantic value. Baseline 3 is appropriate when schema does all the parameter documentation work.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the verb ('Uploads') and resource ('a file') with specific context ('to be used with the Gemini API'). It distinguishes from siblings like gemini_getFile or gemini_deleteFile by focusing on upload functionality. However, it doesn't explicitly differentiate from all siblings beyond the basic upload vs. other operations distinction.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides clear context about when to use this tool ('to be used with the Gemini API') and includes an important exclusion ('NOTE: This API is not supported on Vertex AI clients. It only works with Google AI Studio API keys'). This gives practical guidance about platform compatibility. However, it doesn't explicitly mention alternatives or when NOT to use it relative to sibling tools.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
16 tool updates
v1.0.0- First observed
exampleTool - First observed
gemini_createCache - First observed
gemini_deleteCache - First observed
gemini_deleteFile - First observed
gemini_functionCall - First observed
gemini_generateContent - First observed
gemini_generateContentStream - First observed
gemini_getCache - First observed
gemini_getFile - First observed
gemini_listCaches - First observed
gemini_listFiles - First observed
gemini_sendFunctionResult - First observed
gemini_sendMessage - First observed
gemini_startChat - First observed
gemini_updateCache - First observed
gemini_uploadFile
TDQS
Scored across 16 tools
Every tool has a clearly distinct purpose with no ambiguity. The tools are well-organized into functional groups: content generation (generateContent, generateContentStream, functionCall), chat management (startChat, sendMessage, sendFunctionResult), cache operations (createCache, getCache, updateCache, deleteCache, listCaches), and file operations (uploadFile, getFile, deleteFile, listFiles). The exampleTool serves as a demonstration and doesn't overlap with the Gemini-specific functionality.
The naming is mostly consistent with a clear gemini_prefix followed by verb_noun pattern (e.g., gemini_createCache, gemini_generateContent). The only deviation is exampleTool which lacks the gemini_ prefix and uses camelCase instead of snake_case, but this appears intentional as a demonstration tool. All 15 Gemini tools follow the same consistent naming convention.
16 tools is well-scoped and appropriate for a comprehensive Gemini API server. Each tool earns its place by covering distinct aspects of the Gemini ecosystem: content generation, chat sessions, file management, and caching. The count allows complete coverage without being overwhelming for the domain.
The tool surface provides complete CRUD/lifecycle coverage for all major Gemini API domains. For caches: create, get, update, delete, list. For files: upload, get, delete, list. For chat: start, send messages, send function results. For content: generate (streaming and non-streaming) and function calling. No obvious gaps exist for the server's purpose of providing comprehensive Gemini API access.
Maintenance
Related MCP Connectors
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…
The Mercado Pago MCP Server implements the Model Context Protocol to provide AI agents and LLMs with access to Mercado Pago's APIs and tools within compatible development environments. It acts as an intermediary that translates Mercado Pago resources into executable functions (tools) that AI applications can invoke to perform actions and automate flows. The server simplifies integration, enables using documentation to implement or improve code, and optimizes operations through natural language interactions without manual implementations.
MCP server unifying ERPs, CRMs, APIs and knowledge base for Claude, ChatGPT and Gemini.
The Google GKE MCP server is a managed Model Context Protocol server that provides AI applications with tools to manage Google Kubernetes Engine (GKE) clusters and Kubernetes resources. It exposes a structured, discoverable interface that allows AI agents to interact with GKE and Kubernetes APIs, enabling them to inspect cluster configurations, retrieve Kubernetes resource YAMLs, monitor operations like cluster upgrades, diagnose issues, and optimize costs—all without needing to parse text output or use complex kubectl commands.
Related MCP Servers
- AlicenseAqualityFmaintenanceModel Context Protocol (MCP) server implementation that enables Claude Desktop to interact with Google's Gemini AI models.620 npm261MIT
- FlicenseNot gradedqualityDmaintenanceA server implementing the Model Context Protocol that enables AI assistants like Claude to interact with Google's Gemini API for text generation, text analysis, and chat conversations.-
- AlicenseNot gradedqualityNot gradedmaintenanceAn MCP server implementation that allows using Google's Gemini AI models (specifically Gemini 1.5 Pro) through Claude or other MCP clients via the Model Context Protocol.1MIT
- -licenseNot gradedqualityNot gradedmaintenanceA server that allows interaction with Google's Gemini AI through the Gemini CLI tool using the Model Context Protocol, providing a standardized interface for querying Gemini with various options and configurations.-