Skip to main content
Glama
gurveeer

MCP Server Gemini

by gurveeer

๐Ÿค– MCP Server Gemini

License: MIT TypeScript Node.js

A state-of-the-art Model Context Protocol (MCP) server that provides seamless integration with Google's Gemini AI models. This server enables Claude Desktop and other MCP-compatible clients to leverage the full power of Gemini's advanced AI capabilities.

โœจ Features

๐Ÿง  Latest Gemini Models

  • Gemini 2.5 Pro - Most capable thinking model for complex reasoning

  • Gemini 2.5 Flash - Fast thinking model with best price/performance

  • Gemini 2.0 Series - Latest generation models with advanced features

  • Gemini 1.5 Series - Proven, reliable models for production use

๐Ÿš€ Advanced Capabilities

  • ๐Ÿง  Thinking Models - Gemini 2.5 series with step-by-step reasoning

  • ๐Ÿ” Google Search Grounding - Real-time web information integration

  • ๐Ÿ“Š JSON Mode - Structured output with schema validation

  • ๐ŸŽฏ System Instructions - Behavior customization and control

  • ๐Ÿ‘๏ธ Vision Support - Image analysis and multimodal capabilities

  • ๐Ÿ’ฌ Conversation Memory - Context preservation across interactions

๐Ÿ› ๏ธ Production Ready

  • TypeScript - Full type safety and modern development

  • Comprehensive Error Handling - Robust error management and recovery

  • Rate Limiting - Built-in protection against API abuse

  • Detailed Logging - Comprehensive monitoring and debugging

  • Input Validation - Secure parameter validation with Zod

  • Retry Logic - Automatic retry with exponential backoff

Related MCP server: MCP Gemini Server

๐Ÿš€ Quick Start

Prerequisites

Installation

npm install -g mcp-server-gemini

Option 2: Local Development

git clone https://github.com/gurr-i/mcp-server-gemini-pro.git
cd mcp-server-gemini-pro
npm install
npm run build

Configuration

1. Set up your API key

Option A: Environment Variable

export GEMINI_API_KEY="your_api_key_here"

Option B: .env file

echo "GEMINI_API_KEY=your_api_key_here" > .env

2. Configure Claude Desktop

Add to your claude_desktop_config.json:

For Global Installation:

{
  "mcpServers": {
    "gemini": {
      "command": "mcp-server-gemini",
      "env": {
        "GEMINI_API_KEY": "your_api_key_here"
      }
    }
  }
}

For Local Installation:

{
  "mcpServers": {
    "gemini": {
      "command": "node",
      "args": ["/path/to/mcp-server-gemini-pro/dist/enhanced-stdio-server.js"],
      "env": {
        "GEMINI_API_KEY": "your_api_key_here"
      }
    }
  }
}

3. Restart Claude Desktop

Close and restart Claude Desktop completely for changes to take effect.

๐Ÿ’ก Usage Examples

Once configured, you can use Gemini through Claude Desktop with natural language:

Basic Text Generation

"Use Gemini to explain quantum computing in simple terms"
"Generate a creative story about AI using Gemini 2.5 Pro"

Advanced Features

"Use Gemini with JSON mode to extract key points from this text"
"Use Gemini with grounding to get the latest news about AI"
"Generate a Python function using Gemini's thinking capabilities"

Image Analysis

"Analyze this image with Gemini" (attach image)
"What's in this screenshot using Gemini vision?"

Development Tasks

"Use Gemini to review this code and suggest improvements"
"Generate comprehensive tests for this function using Gemini"

โš™๏ธ Configuration

Environment Variables

The server can be configured using environment variables or a .env file:

Required Configuration

# Google AI Studio API Key (required)
GEMINI_API_KEY=your_api_key_here

Optional Configuration

# Logging level (default: info)
# Options: error, warn, info, debug
LOG_LEVEL=info

# Enable performance metrics (default: false)
ENABLE_METRICS=false

# Rate limiting configuration
RATE_LIMIT_ENABLED=true        # Enable/disable rate limiting (default: true)
RATE_LIMIT_REQUESTS=100        # Max requests per window (default: 100)
RATE_LIMIT_WINDOW=60000        # Time window in ms (default: 60000 = 1 minute)

# Request timeout in milliseconds (default: 30000 = 30 seconds)
REQUEST_TIMEOUT=30000

# Environment mode (default: production)
NODE_ENV=production

Environment Setup

Development Environment

# .env for development
GEMINI_API_KEY=your_api_key_here
NODE_ENV=development
LOG_LEVEL=debug
RATE_LIMIT_ENABLED=false
REQUEST_TIMEOUT=60000

Production Environment

# .env for production
GEMINI_API_KEY=your_api_key_here
NODE_ENV=production
LOG_LEVEL=warn
RATE_LIMIT_ENABLED=true
RATE_LIMIT_REQUESTS=100
RATE_LIMIT_WINDOW=60000
REQUEST_TIMEOUT=30000
ENABLE_METRICS=true

Claude Desktop Configuration

Configuration File Locations

OS

Path

macOS

~/Library/Application Support/Claude/claude_desktop_config.json

Windows

%APPDATA%\Claude\claude_desktop_config.json

Linux

~/.config/Claude/claude_desktop_config.json

Basic Configuration

{
  "mcpServers": {
    "gemini": {
      "command": "mcp-server-gemini",
      "env": {
        "GEMINI_API_KEY": "your_api_key_here"
      }
    }
  }
}

Advanced Configuration

{
  "mcpServers": {
    "gemini": {
      "command": "mcp-server-gemini",
      "env": {
        "GEMINI_API_KEY": "your_api_key_here",
        "LOG_LEVEL": "info",
        "RATE_LIMIT_REQUESTS": "200",
        "REQUEST_TIMEOUT": "45000"
      }
    }
  }
}

Local Development Configuration

{
  "mcpServers": {
    "gemini": {
      "command": "node",
      "args": ["/path/to/mcp-server-gemini-pro/dist/enhanced-stdio-server.js"],
      "cwd": "/path/to/mcp-server-gemini-pro",
      "env": {
        "GEMINI_API_KEY": "your_api_key_here",
        "NODE_ENV": "development",
        "LOG_LEVEL": "debug"
      }
    }
  }
}

๐Ÿ› ๏ธ Available Tools

Tool

Description

Key Features

generate_text

Generate text with advanced features

Thinking models, JSON mode, grounding

analyze_image

Analyze images using vision models

Multi-modal understanding, detailed analysis

count_tokens

Count tokens for cost estimation

Accurate token counting for all models

list_models

List all available Gemini models

Real-time model availability and features

embed_text

Generate text embeddings

High-quality vector representations

get_help

Get usage help and documentation

Self-documenting with examples

๐Ÿ“Š Model Comparison

Model

Context Window

Features

Best For

Speed

gemini-2.5-pro

2M tokens

Thinking, JSON, Grounding

Complex reasoning, coding

Slower

gemini-2.5-flash โญ

1M tokens

Thinking, JSON, Grounding

General purpose

Fast

gemini-2.5-flash-lite

1M tokens

Thinking, JSON

High-throughput tasks

Fastest

gemini-2.0-flash

1M tokens

JSON, Grounding

Standard tasks

Fast

gemini-2.0-flash-lite

1M tokens

JSON

Simple tasks

Fastest

gemini-2.0-pro-experimental

2M tokens

JSON, Grounding

Experimental features

Medium

gemini-1.5-pro

2M tokens

JSON

Legacy support

Medium

gemini-1.5-flash

1M tokens

JSON

Legacy support

Fast

๐Ÿ”ง Development

Prerequisites

  • Node.js 16+ (Download)

  • npm 7+ (comes with Node.js)

  • Git for version control

  • Google AI Studio API Key (Get one here)

Setup

# Clone the repository
git clone https://github.com/gurr-i/mcp-server-gemini-pro.git
cd mcp-server-gemini-pro

# Install dependencies
npm install

# Set up environment variables
cp .env.example .env
# Edit .env and add your GEMINI_API_KEY

Available Scripts

Development

npm run dev          # Start development server with hot reload
npm run dev:watch    # Start with file watching (nodemon)
npm run build        # Build for production
npm run build:watch  # Build with watch mode
npm run clean        # Clean build directory

Testing

npm test             # Run all tests
npm run test:watch   # Run tests in watch mode
npm run test:coverage # Run tests with coverage report
npm run test:integration # Run integration tests (requires API key)

Code Quality

npm run lint         # Lint TypeScript code
npm run lint:fix     # Fix linting issues automatically
npm run format       # Format code with Prettier
npm run format:check # Check code formatting
npm run type-check   # Run TypeScript type checking
npm run validate     # Run all quality checks (lint + test + type-check)

Release & Distribution

npm run prepack      # Prepare package for publishing
npm run release      # Build, validate, and publish to npm

Project Structure

mcp-server-gemini/
โ”œโ”€โ”€ src/                          # Source code
โ”‚   โ”œโ”€โ”€ config/                   # Configuration management
โ”‚   โ”‚   โ””โ”€โ”€ index.ts             # Environment config with Zod validation
โ”‚   โ”œโ”€โ”€ utils/                   # Utility modules
โ”‚   โ”‚   โ”œโ”€โ”€ logger.ts           # Structured logging system
โ”‚   โ”‚   โ”œโ”€โ”€ errors.ts           # Custom error classes & handling
โ”‚   โ”‚   โ”œโ”€โ”€ validation.ts       # Input validation with Zod
โ”‚   โ”‚   โ””โ”€โ”€ rateLimiter.ts      # Rate limiting implementation
โ”‚   โ”œโ”€โ”€ enhanced-stdio-server.ts # Main MCP server implementation
โ”‚   โ””โ”€โ”€ types.ts                # TypeScript type definitions
โ”œโ”€โ”€ tests/                       # Test suite
โ”‚   โ”œโ”€โ”€ unit/                   # Unit tests
โ”‚   โ”‚   โ”œโ”€โ”€ config.test.ts      # Configuration tests
โ”‚   โ”‚   โ”œโ”€โ”€ validation.test.ts  # Validation tests
โ”‚   โ”‚   โ””โ”€โ”€ errors.test.ts      # Error handling tests
โ”‚   โ”œโ”€โ”€ integration/            # Integration tests
โ”‚   โ”‚   โ””โ”€โ”€ gemini-api.test.ts  # Real API integration tests
โ”‚   โ””โ”€โ”€ setup.ts               # Test setup and utilities
โ”œโ”€โ”€ docs/                       # Documentation
โ”‚   โ”œโ”€โ”€ api.md                 # API reference
โ”‚   โ”œโ”€โ”€ configuration.md       # Configuration guide
โ”‚   โ””โ”€โ”€ troubleshooting.md     # Troubleshooting guide
โ”œโ”€โ”€ scripts/                    # Build and utility scripts
โ”‚   โ”œโ”€โ”€ build.sh              # Production build script
โ”‚   โ”œโ”€โ”€ dev.sh                # Development script
โ”‚   โ””โ”€โ”€ test.sh               # Test execution script
โ”œโ”€โ”€ .github/workflows/         # GitHub Actions CI/CD
โ”‚   โ”œโ”€โ”€ ci.yml                # Continuous integration
โ”‚   โ””โ”€โ”€ release.yml           # Automated releases
โ”œโ”€โ”€ dist/                      # Built output (generated)
โ”œโ”€โ”€ coverage/                  # Test coverage reports (generated)
โ””โ”€โ”€ node_modules/             # Dependencies (generated)

๐Ÿงช Testing

Test Suite Overview

The project includes comprehensive testing with unit tests, integration tests, and code coverage reporting.

Running Tests

All Tests

npm test                    # Run all tests (unit tests only by default)
npm run test:watch         # Run tests in watch mode for development
npm run test:coverage      # Run tests with coverage report

Unit Tests

npm test -- --testPathPattern=unit    # Run only unit tests
npm test -- --testNamePattern="config" # Run specific test suites

Integration Tests

Integration tests require a valid GEMINI_API_KEY and make real API calls:

# Set API key and run integration tests
GEMINI_API_KEY=your_api_key_here npm run test:integration

# Or set in .env file and run
npm run test:integration

Test Coverage

npm run test:coverage      # Generate coverage report
open coverage/lcov-report/index.html  # View coverage report (macOS)

Test Structure

Unit Tests (tests/unit/)

  • Configuration Tests: Environment variable validation, config loading

  • Validation Tests: Input validation, schema validation, sanitization

  • Error Handling Tests: Custom error classes, error recovery, retry logic

  • Utility Tests: Logger, rate limiter, helper functions

Integration Tests (tests/integration/)

  • Gemini API Tests: Real API calls to test connectivity and functionality

  • Model Testing: Verify all supported models work correctly

  • Feature Testing: JSON mode, grounding, embeddings, token counting

Writing Tests

Test File Structure

// tests/unit/example.test.ts
import { describe, it, expect, beforeEach, afterEach } from '@jest/globals';
import { YourModule } from '../../src/your-module.js';

describe('YourModule', () => {
  beforeEach(() => {
    // Setup before each test
  });

  afterEach(() => {
    // Cleanup after each test
  });

  it('should do something', () => {
    // Test implementation
    expect(result).toBe(expected);
  });
});

Custom Matchers

The test suite includes custom Jest matchers:

expect(response).toBeValidMCPResponse(); // Validates MCP response format

Test Configuration

Tests are configured in jest.config.js with:

  • TypeScript Support: Full ES modules and TypeScript compilation

  • Coverage Thresholds: Minimum 70% coverage required

  • Test Timeout: 30 seconds for integration tests

  • Setup Files: Automatic test environment setup

๐Ÿณ Docker Deployment

Using Docker

Build and Run

# Build the Docker image
docker build -t mcp-server-gemini .

# Run the container
docker run -d \
  --name mcp-server-gemini \
  -e GEMINI_API_KEY=your_api_key_here \
  -e LOG_LEVEL=info \
  mcp-server-gemini

Using Docker Compose

# Create .env file with your API key
echo "GEMINI_API_KEY=your_api_key_here" > .env

# Start the service
docker-compose up -d

# View logs
docker-compose logs -f

# Stop the service
docker-compose down

Development with Docker

# Start development environment
docker-compose --profile dev up

# This mounts source code for live reloading

Environment-Specific Deployments

Production Deployment

# Production build
docker build --target production -t mcp-server-gemini:prod .

# Run with production settings
docker run -d \
  --name mcp-server-gemini-prod \
  --restart unless-stopped \
  -e GEMINI_API_KEY=your_api_key_here \
  -e NODE_ENV=production \
  -e LOG_LEVEL=warn \
  -e RATE_LIMIT_ENABLED=true \
  -e ENABLE_METRICS=true \
  mcp-server-gemini:prod

Health Checks

# Check container health
docker ps
docker logs mcp-server-gemini

# Manual health check
docker exec mcp-server-gemini node -e "console.log('Health check passed')"

๐Ÿš€ Deployment Options

1. npm Global Installation

# Install globally
npm install -g mcp-server-gemini

# Run directly
GEMINI_API_KEY=your_key mcp-server-gemini

2. Local Installation

# Clone and build
git clone https://github.com/gurr-i/mcp-server-gemini-pro.git
cd mcp-server-gemini-pro
npm install
npm run build

# Run locally
GEMINI_API_KEY=your_key npm start

3. Docker Deployment

# Using Docker Hub (when published)
docker run -e GEMINI_API_KEY=your_key mcp-server-gemini-pro:latest

# Using local build
docker build -t mcp-server-gemini-pro .
docker run -e GEMINI_API_KEY=your_key mcp-server-gemini-pro

4. Process Manager (PM2)

# Install PM2
npm install -g pm2

# Create ecosystem file
cat > ecosystem.config.js << EOF
module.exports = {
  apps: [{
    name: 'mcp-server-gemini',
    script: './dist/enhanced-stdio-server.js',
    env: {
      NODE_ENV: 'production',
      GEMINI_API_KEY: 'your_api_key_here',
      LOG_LEVEL: 'info'
    }
  }]
}
EOF

# Start with PM2
pm2 start ecosystem.config.js
pm2 save
pm2 startup

๐Ÿ”ง Troubleshooting

Common Issues

1. Server Won't Start

# Check if API key is set
echo $GEMINI_API_KEY

# Verify .env file exists and is readable
cat .env | grep GEMINI_API_KEY

# Check file permissions
ls -la .env
chmod 600 .env

2. API Key Issues

# Test API key manually
curl -H "Content-Type: application/json" \
     -d '{"contents":[{"parts":[{"text":"Hello"}]}]}' \
     -X POST "https://generativelanguage.googleapis.com/v1beta/models/gemini-pro:generateContent?key=YOUR_API_KEY"

3. Claude Desktop Integration

# Verify config file location (macOS)
ls -la ~/Library/Application\ Support/Claude/claude_desktop_config.json

# Validate JSON syntax
cat claude_desktop_config.json | jq .

# Check server installation
which mcp-server-gemini
npm list -g mcp-server-gemini

4. Rate Limiting

# Temporarily disable rate limiting
export RATE_LIMIT_ENABLED=false

# Increase limits
export RATE_LIMIT_REQUESTS=1000
export RATE_LIMIT_WINDOW=60000

Debug Mode

# Enable debug logging
export LOG_LEVEL=debug
npm run dev

# Or for production
export LOG_LEVEL=debug
npm start

Getting Help

๐Ÿ”’ Security

API Key Security

  • Never commit API keys to version control

  • Use environment variables or secure secret management

  • Rotate keys regularly for production use

  • Use different keys for development and production

Rate Limiting

  • Enable rate limiting in production (RATE_LIMIT_ENABLED=true)

  • Configure appropriate limits based on your usage patterns

  • Monitor API usage to prevent quota exhaustion

Input Validation

  • All inputs are automatically validated and sanitized

  • XSS and injection protection built-in

  • Schema validation for all tool parameters

Container Security

  • Runs as non-root user in Docker

  • Read-only filesystem with minimal privileges

  • Security scanning in CI/CD pipeline

๐Ÿ“š Documentation

๐Ÿค Contributing

We welcome contributions! Please see our Contributing Guide for details.

Development Workflow

  1. Fork the repository

  2. Create a feature branch

  3. Make your changes

  4. Add tests

  5. Run npm run validate

  6. Submit a pull request

๐Ÿ“„ License

MIT License - see LICENSE file for details.

๐Ÿ™ Acknowledgments

  • Google AI for the Gemini API

  • Anthropic for the Model Context Protocol

  • The open-source community for inspiration and feedback

๐Ÿ“ž Support


Available Tools

6 tools
analyze_imageC

Analyze images using Gemini vision capabilities

ParametersJSON Schema
NameRequiredDescriptionDefault
promptYesQuestion or instruction about the image
imageUrlNoURL of the image to analyze
imageBase64NoBase64-encoded image data (alternative to URL)
modelNoVision-capable Gemini modelgemini-2.5-flash

TDQS

C2.9/5.0
Behavior2/5

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 mentions 'analyze images' but doesn't describe what the analysis entails (e.g., object detection, captioning, classification), potential limitations (e.g., image size, format constraints), or response format. This is a significant gap 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.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence with zero waste. It's front-loaded with the core purpose and uses clear language, making it easy to parse quickly without unnecessary details.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the complexity of image analysis (a non-trivial operation), no annotations, and no output schema, the description is incomplete. It lacks details on behavioral traits, output format, and usage context, which are crucial for an AI agent to invoke this tool effectively in practice.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema already documents all 4 parameters thoroughly. The description adds no additional meaning beyond what's in the schema (e.g., it doesn't explain parameter interactions like choosing between 'imageUrl' and 'imageBase64'). Baseline 3 is appropriate as the schema does the heavy lifting.

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?

The description clearly states the action ('analyze images') and the capability used ('Gemini vision capabilities'), providing a specific verb+resource combination. However, it doesn't explicitly differentiate this tool from its siblings like 'generate_text' or 'embed_text', which might also handle text generation or embeddings potentially involving images, so it misses 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.

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention any context for choosing this over other sibling tools (e.g., 'generate_text' for text generation or 'list_models' for model information), nor does it specify prerequisites or exclusions, leaving usage ambiguous.

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

count_tokensC

Count tokens for a given text with a specific model

ParametersJSON Schema
NameRequiredDescriptionDefault
textYesText to count tokens for
modelNoModel to use for token countinggemini-2.5-flash

TDQS

C2.9/5.0
Behavior2/5

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 counts tokens but doesn't describe what a 'token' means in this context, whether there are rate limits, error handling, or output format. For a tool with no annotation coverage, this is a significant gap in transparency.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence with zero waste. It's front-loaded with the core purpose and appropriately sized for the tool's complexity, making it easy for an agent to parse quickly.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's moderate complexity (2 parameters, no output schema, no annotations), the description is incomplete. It lacks details on behavioral traits, usage context, and output expectations. While the schema covers parameters well, the description doesn't compensate for missing annotations or output schema, leaving gaps in overall understanding.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema fully documents both parameters ('text' and 'model'). The description adds no additional meaning beyond what's in the schema, such as explaining tokenization nuances or model-specific behaviors. Baseline 3 is appropriate when the schema handles all parameter documentation.

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?

The description clearly states the tool's purpose: 'Count tokens for a given text with a specific model'. It specifies the verb ('count'), resource ('tokens'), and scope ('text' and 'model'). However, it doesn't explicitly differentiate from sibling tools like 'embed_text' or 'generate_text', which might also involve token processing, so it doesn't reach the highest score.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention scenarios where token counting is needed over other operations like text generation or embedding, nor does it reference sibling tools. This leaves the agent without context for tool selection.

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

embed_textC

Generate embeddings for text using Gemini embedding models

ParametersJSON Schema
NameRequiredDescriptionDefault
textYesText to generate embeddings for
modelNoEmbedding model to usetext-embedding-004

TDQS

C2.9/5.0
Behavior2/5

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 basic function but lacks details on rate limits, authentication needs, output format (e.g., vector dimensions), error handling, or performance characteristics. For a tool with no annotations, 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.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that directly states the tool's purpose without unnecessary words. It's appropriately sized and front-loaded, making it easy to grasp quickly. Every part of the sentence earns its place by specifying the action, resource, and technology.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the complexity (embedding generation with model selection), lack of annotations, and no output schema, the description is incomplete. It doesn't explain what embeddings are, their format, or practical applications, leaving the agent with insufficient context to use the tool effectively beyond basic invocation.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema already documents both parameters ('text' and 'model') with descriptions and enum values. The description adds no additional meaning beyond what the schema provides, such as explaining embedding use cases or model differences. 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.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('Generate embeddings') and resource ('for text using Gemini embedding models'), making the purpose immediately understandable. It distinguishes from siblings like 'analyze_image' or 'generate_text' by focusing on embeddings. However, it doesn't explicitly differentiate from 'count_tokens' which might be related, keeping it at 4 rather than 5.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention use cases for embeddings (e.g., semantic search, clustering) or when to choose it over other tools like 'generate_text' for similar text processing tasks. There's no explicit when/when-not or alternative tool references.

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

generate_textC

Generate text using Google Gemini with advanced features

ParametersJSON Schema
NameRequiredDescriptionDefault
promptYesThe prompt to send to Gemini
modelNoSpecific Gemini model to usegemini-2.5-flash
systemInstructionNoSystem instruction to guide model behavior
temperatureNoTemperature for generation (0-2)
maxTokensNoMaximum tokens to generate
topKNoTop-k sampling parameter
topPNoTop-p (nucleus) sampling parameter
jsonModeNoEnable JSON mode for structured output
jsonSchemaNoJSON schema as a string for structured output (when jsonMode is true)
groundingNoEnable Google Search grounding for up-to-date information
safetySettingsNoSafety settings as JSON string for content filtering
conversationIdNoID for maintaining conversation context

TDQS

C2.6/5.0
Behavior2/5

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. While 'Generate text' implies a read-only operation, the description doesn't address important behavioral aspects like rate limits, authentication requirements, cost implications, error handling, or what constitutes 'advanced features.' The mention of 'Google Gemini' hints at external API usage but lacks specifics.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that gets straight to the point without unnecessary words. While it could be more informative, it's appropriately concise and front-loaded with the core functionality. Every word earns its place, though more content would be justified given the tool's complexity.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a complex tool with 12 parameters, no annotations, and no output schema, the description is inadequate. It doesn't explain what 'advanced features' means, doesn't describe the return format or structure, and provides no context about error conditions, rate limits, or typical use cases. The description fails to compensate for the lack of structured metadata.

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?

The input schema has 100% description coverage with detailed parameter documentation, so the baseline is 3. The description adds minimal value beyond the schema by mentioning 'advanced features' which vaguely references some parameters like grounding and jsonMode, but doesn't provide meaningful semantic context about how parameters interact or when to use specific combinations.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose3/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states the tool 'Generate text using Google Gemini with advanced features' which provides a clear verb ('Generate text') and resource ('Google Gemini'). However, it's somewhat vague about what 'advanced features' entails and doesn't distinguish this text generation tool from its sibling tools like 'analyze_image' or 'embed_text' beyond the basic domain difference.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives. There's no mention of when to choose this over other text generation methods, when to use specific parameter combinations, or how it relates to sibling tools like 'count_tokens' or 'embed_text' which might be complementary.

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

get_helpC

Get help and usage information for the Gemini MCP server

ParametersJSON Schema
NameRequiredDescriptionDefault
topicNoHelp topic to get information aboutoverview

TDQS

C2.9/5.0
Behavior2/5

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 help information, implying a read-only operation, but doesn't specify if it requires authentication, has rate limits, returns structured or unstructured data, or handles errors. For a 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.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, clear sentence that efficiently conveys the core purpose without unnecessary words. It's front-loaded with the main action, making it easy to parse. However, it could be slightly more structured by hinting at the parameter usage, but overall it's concise and well-formed.

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?

Given the tool's low complexity (one optional parameter with full schema coverage) and lack of output schema, the description is minimally adequate. It states what the tool does but doesn't cover behavioral aspects like response format or error handling, which are important for a help tool. With no annotations, it should provide more context to be fully complete.

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?

The input schema has 100% description coverage, with the 'topic' parameter fully documented including its enum values and default. The description doesn't add any semantic details beyond what the schema provides, such as explaining what each topic covers or how the help is formatted. Given the high schema coverage, the baseline score of 3 is appropriate as the schema does the heavy lifting.

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?

The description clearly states the tool's purpose: 'Get help and usage information for the Gemini MCP server.' It uses a specific verb ('Get') and identifies the resource ('help and usage information'), though it doesn't explicitly differentiate from sibling tools like 'list_models' which might provide model information. The purpose is unambiguous but lacks sibling distinction.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites, context for usage, or compare it to sibling tools like 'list_models' for model info or 'generate_text' for examples. The agent must infer usage from the purpose alone, which is insufficient for optimal tool selection.

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

list_modelsB

List all available Gemini models and their capabilities

ParametersJSON Schema
NameRequiredDescriptionDefault
filterNoFilter models by capability

TDQS

B3.1/5.0
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It states what the tool does but doesn't describe key behaviors such as whether it's a read-only operation, if it requires authentication, rate limits, or what the output format looks like (e.g., list structure, pagination). This leaves significant gaps for an agent to understand how to interact with it effectively.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that directly states the tool's purpose without any unnecessary words. It's front-loaded and appropriately sized for a simple tool, making it easy for an agent to parse quickly.

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?

Given the tool's low complexity (one optional parameter) and rich schema coverage, the description is minimally adequate. However, with no output schema and no annotations, it doesn't fully compensate by explaining return values or behavioral traits, leaving the agent with incomplete context for proper usage.

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?

The input schema has 100% description coverage, with a clear enum for the 'filter' parameter. The description mentions 'capabilities', which aligns with the schema's 'filter by capability', but doesn't add meaningful semantics beyond what the schema already provides (e.g., explaining what each enum value means in context). 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.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb ('List') and resource ('all available Gemini models and their capabilities'), making the purpose unambiguous. However, it doesn't explicitly differentiate from sibling tools like 'get_help' or 'analyze_image', which might also involve model information, so it doesn't reach the highest score.

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

Usage Guidelines2/5

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. For example, it doesn't specify if this should be used for discovery before calling 'generate_text' or how it relates to 'get_help'. The description lacks context about usage scenarios or exclusions.

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

TDQS

B3.3/5.0
Disambiguation5/5

Each tool has a clearly distinct purpose with no overlap: image analysis, token counting, text embedding, text generation, help retrieval, and model listing. The descriptions reinforce these distinct functions, making tool selection unambiguous for an agent.

Naming Consistency4/5

Most tools follow a consistent verb_noun pattern (analyze_image, count_tokens, embed_text, generate_text, list_models), but get_help deviates slightly with a 'get_' prefix. The naming is still highly readable and predictable overall.

Tool Count5/5

With 6 tools, this server is well-scoped for Gemini AI interactions. Each tool earns its place by covering distinct aspects: vision, token management, embeddings, text generation, help, and model discovery, without being overly sparse or bloated.

Completeness4/5

The toolset covers core Gemini AI workflows comprehensively, including text and image processing, embeddings, and model management. A minor gap exists in lacking explicit tools for chat/multi-turn conversations or file uploads, but agents can work around this using generate_text and analyze_image.

Maintenance

ActivityInactive
ResponsivenessNo issues

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers

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/gurveeer/mcp-server-gemini-pro'

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