Skip to main content
Glama

GemForge-Gemini-Tools-MCP

constants.ts.bak3.2 kB
/** * Constants used throughout the application */ import dotenv from 'dotenv'; dotenv.config(); /** * API configuration */ export const API = { /** Gemini API base endpoint */ ENDPOINT: 'https://generativelanguage.googleapis.com/v1alpha/models', /** Gemini API key from environment variables */ API_KEY: process.env.GEMINI_API_KEY || '', /** Whether using paid tier (for rate limits) */ IS_PAID_TIER: process.env.GEMINI_PAID_TIER === 'true', /** Default model ID from environment or fallback */ DEFAULT_MODEL_ID: process.env.DEFAULT_MODEL_ID || 'gemini-2.0-flash', }; /** * Centralized Model IDs - updated with latest preview models */ export const MODEL_IDS = { /** Fast, efficient model for simple tasks and rapid processing */ FAST: 'gemini-2.0-flash-lite', /** Balanced model for general-purpose use */ BALANCED: 'gemini-2.0-flash', /** Advanced model for complex reasoning and high-quality outputs */ ADVANCED: 'gemini-1.5-pro', /** Model optimized for handling very large context windows */ LARGE_CONTEXT: 'gemini-1.5-pro', /** Legacy model IDs for backward compatibility */ LEGACY: { FLASH: 'gemini-2.0-flash', FLASH_LITE: 'gemini-2.0-flash-lite', FLASH_THINKING: 'gemini-1.5-pro' } }; /** * Rate limiting configuration */ export const RATE_LIMITS = { /** Maximum number of retries for rate limited requests */ MAX_RETRIES: 5, /** Base delay for exponential backoff (milliseconds) */ BASE_DELAY_MS: 1000, /** Maximum delay for exponential backoff (milliseconds) */ MAX_DELAY_MS: 60000, /** Jitter factor for randomizing backoff delays (0-1) */ JITTER_FACTOR: 0.2 }; /** * Error message templates */ export const ERROR_MESSAGES = { /** API key missing error */ API_KEY_MISSING: 'GEMINI_API_KEY environment variable is required', /** Rate limit error template */ RATE_LIMIT: (modelId: string, timeInSeconds: number) => `Rate limit reached for ${modelId}. Try again in ${timeInSeconds} seconds.`, /** Thinking capability error */ THINKING_NOT_SUPPORTED: (modelDisplayName: string) => `Thinking mode is not supported by ${modelDisplayName}. Please use Gemini 2.5 Pro.`, /** Search capability error */ SEARCH_NOT_SUPPORTED: (modelDisplayName: string) => `Search integration is not supported by ${modelDisplayName}. Please use Gemini 2.5 Flash or Gemini 2.0 Flash.`, /** Model not found error */ MODEL_NOT_FOUND: (modelId: string) => `Model ${modelId} not found. Please check available models and their supported methods.`, }; /** * Response formatting */ export const RESPONSE_FORMAT = { /** Section headings for different response components */ SECTIONS: { THINKING: '### Thinking Process:', RESPONSE: '### Final Response:', SEARCH: '### Search Results:' } }; /** * Function names for tool handlers */ export const TOOL_NAMES = { GEM_SEARCH: 'gemini_search', GEM_REASON: 'gemini_reason', GEM_PROCESS: 'gemini_process', GEM_ANALYZE: 'gemini_analyze', // Legacy names for backward compatibility SEARCH: 'gemini_search', RAPID_SEARCH: 'gemini_rapid_search', REASON: 'gemini_reason', ANALYZE_FILE: 'gemini_analyze_file', };

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/PV-Bhat/GemForge-MCP'

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