gpal
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| GEMINI_API_KEY | No | Your Google Gemini API key | |
| GOOGLE_API_KEY | No | Your Google Gemini API key (alternative) | |
| OTEL_SERVICE_NAME | No | OpenTelemetry service name (default: gpal-server) | |
| OTEL_EXPORTER_OTLP_ENDPOINT | No | OpenTelemetry OTLP gRPC endpoint (default: http://localhost:4317) |
Capabilities
Features and capabilities supported by this server
| Capability | Details |
|---|---|
| tools | {
"listChanged": true
} |
| prompts | {
"listChanged": false
} |
| resources | {
"subscribe": false,
"listChanged": false
} |
| extensions | {
"io.modelcontextprotocol/ui": {}
} |
| experimental | {} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| gemini_searchA | Search the web using Gemini's built-in Google Search. Returns formatted search results (titles, URLs, snippets). Stateless utility. |
| gemini_code_execA | Execute Python code using Gemini's built-in code execution sandbox. Returns stdout, stderr, and any execution results. Stateless utility. |
| consult_geminiA | Consult Gemini for codebase analysis. Gemini autonomously explores our project — reading files, listing directories, and searching code — so we don't need to pre-read files. Just describe what we need. Use file_paths only when specific files must be included. Pipeline: For auto, flash, and pro, Lite explores quickly first, then our selected model synthesizes. "lite" and explicit model IDs skip the exploration phase and query directly. Gemini's tools: list_directory, read_file, search_project, git, gemini_search; FileSearch stores are searched automatically when present. |
| consult_gemini_oneshotA | Stateless single-shot Gemini query with no session history. Use for independent questions, one-off lookups, or batch-style queries where conversation context would be noise. Still has tool access (list_directory, read_file, etc.) and retry logic. |
| upload_fileC | Upload a large file to Gemini's File API. |
| create_context_cacheA | Create a Gemini context cache for a set of files. Caching is useful for large files (>32k tokens) used across multiple turns. Model must be an explicit version (e.g., gemini-1.5-flash-001) or a supported alias. |
| delete_context_cacheB | Delete a Gemini context cache. |
| create_file_storeA | Create a new FileSearch store for semantic code search. Upload files to the store with upload_to_file_store. Once populated, Gemini will automatically search the store during consult_gemini calls. |
| list_file_storesA | List all FileSearch stores with document counts and sizes. |
| delete_file_storeA | Delete a FileSearch store and all its documents. |
| upload_to_file_storeA | Upload a file to a FileSearch store for semantic search. Supported: text, code, PDF, and other document formats. Files are chunked and embedded by Google for retrieval. |
| list_modelsA | List available Gemini models grouped by capability. Queries the Gemini API for all accessible models and groups them by supported actions (generateContent, generateImages, embedContent, etc.). |
| generate_imageA | Generates an image using Imagen or Nano Banana (Gemini image) models. Args: prompt: Text description of the image to generate. output_path: File path to save the generated image. model: Model alias or ID. "imagen" (default, ultra), "imagen-fast", "nano-pro", or "nano-flash". aspect_ratio: Aspect ratio (e.g. "1:1", "16:9", "9:16", "4:3", "3:4"). image_size: Output size for Nano Banana only (e.g. "1024x1024"). Not supported by Imagen. |
| generate_speechB | Synthesizes speech from text. |
| create_batchA | Submit a batch of queries for async processing (~50% cost discount). Batches run asynchronously (up to 24h). No tool use — inline all relevant context in each prompt. Use get_batch/list_batches to check status and get_batch_results when the job completes. The system prompt follows the same configuration as consult_gemini (config.toml, --system-prompt CLI flags). Args: queries: List of {custom_id: str, prompt: str} dicts. model: Model alias or ID (default: "flash"). "pro" enables deep thinking. temperature: Sampling temperature (default: 0.2). |
| get_batchA | Get the status of a batch job. Args: name: Batch job name (e.g. "batches/abc") from create_batch. |
| list_batchesA | List recent batch jobs. Args: limit: Maximum number of batches to return (default: 20, max: 100). |
| get_batch_resultsA | Get results from a completed batch job. Only available when state is JOB_STATE_SUCCEEDED or JOB_STATE_PARTIALLY_SUCCEEDED. Results include text extracted from each response, keyed by custom_id. Args: name: Batch job name from create_batch. |
| cancel_batchA | Cancel a running batch job. Already-completed requests are unaffected. Args: name: Batch job name from create_batch. |
| delete_batchA | Delete a batch job. Only works on ended (succeeded/failed/cancelled) jobs. Args: name: Batch job name from create_batch. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
| get_server_info | Server version, model configuration, and limits. |
| list_sessions_resource | List active session IDs with model and history count. |
| get_file_stores_info | FileSearch store statistics. |
| list_context_caches_resource | List active Gemini context caches. |
| check_model_freshness | Compare configured models against available models from the API. Lists each configured model, whether it exists in the API, and flags any -latest aliases that have resolved to newer versions. |
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/tobert/gpal'
If you have feedback or need assistance with the MCP directory API, please join our Discord server