Skip to main content
Glama
hampsterx

gemini-mcp-bridge

by hampsterx

query

Ask Gemini to explore your codebase: it reads files, greps, and lists directories to answer prompts, analyze code, or return structured edits.

Instructions

Agentic query: Gemini runs inside your workingDirectory with read_file, grep, list_directory, and glob tools. Pass file paths as hints (not content) — Gemini reads them itself and can explore surrounding code for context.

Capabilities:

  • Code analysis with full repo exploration (Gemini follows imports, reads tests, checks related files)

  • Image understanding: screenshots, diagrams, architecture charts (png/jpg/gif/webp/bmp)

  • General knowledge questions and technical research

  • Text transformation, summarization, and generation

  • Change mode: structured edit blocks parsed into a machine-applicable edits array (see 'changeMode' below)

File handling: Pass file paths in the 'files' array as hints. Text files are referenced via @{path} — Gemini reads them with its own tools. Image files use --yolo mode for native pixel access. Gemini may also read files beyond the ones you hint at.

Note: Gitignored files cannot be read in text-query mode (plan mode restriction). Image queries (--yolo) can read gitignored files.

Change mode: set 'changeMode: true' to ask Gemini to emit structured **FILE: <path>:<start>-<end>** / ===OLD=== / ===NEW=== blocks instead of prose. The response text stays in response; parsed edits are returned on _meta.edits and never chunked. The tool runs in default agentic mode (NOT plan mode, which refuses to emit edit blocks) with a pre/post-spawn git snapshot that detects any file writes Gemini might attempt. If writes are detected the tool returns _meta.appliedWrites: true and omits edits for safety. Text-only (image files rejected). Requires a git working directory.

Model tips: Use gemini-2.5-flash for speed, gemini-2.5-pro for depth and complex reasoning. If omitted, the CLI auto-selects via its routing model.

Each invocation spawns a fresh CLI process (~15-20s startup overhead). Plan timeouts accordingly.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
filesNoFile paths relative to workingDirectory, passed as hints. Gemini reads them with its own tools — contents are NOT inlined. Image files (png, jpg, jpeg, gif, webp, bmp) trigger --yolo mode. Max 20 files, 1MB per text file, 5MB per image.
modelNoGemini model override. Options: gemini-2.5-flash (fast), gemini-2.5-pro (deep). Omit to let CLI auto-route.
promptYesThe prompt to send to Gemini
timeoutNoTimeout in milliseconds (default: 120000, max: 1800000). Minimum useful: ~20s due to CLI startup.
changeModeNoWhen true, Gemini emits structured **FILE: path:start-end** / ===OLD=== / ===NEW=== edit blocks. Legacy OLD:/NEW: markers are still parsed for back-compat. Parsed edits are returned on _meta.edits (never chunked). A pre/post-spawn git snapshot enforces that Gemini did not write any files; if writes are detected, _meta.appliedWrites is true and edits are omitted. Text-only, requires a git workingDirectory.
workingDirectoryNoWorking directory for file resolution and project context. The CLI reads GEMINI.md/AGENTS.md from here automatically.
maxResponseLengthNoSoft limit on response length in words (e.g. 500). Reduces oversized responses from Gemini's large context window.
Behavior5/5

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

Beyond annotations (readOnlyHint=false, openWorldHint=true, etc.), the description richly discloses behaviors: fresh CLI spawn per invocation (~15–20s startup), file-hint semantics, read-beyond-hints, gitignore restrictions, pre/post-spawn git snapshot safety, structured edit parsing never chunked, and _meta.appliedWrites detection. No contradictions with annotations.

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?

Although lengthy, the description is logically organized with sections for capabilities, file handling, change mode, model tips, and startup overhead. Each sentence contributes essential information, and key facts are front-loaded. No filler or redundant prose.

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

Completeness5/5

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

For a complex tool with 7 parameters and no output schema, the description covers operational behavior, constraints, prerequisites, and response metadata (e.g., _meta.edits, _meta.appliedWrites). It provides enough detail for an agent to use the tool correctly without requiring additional external knowledge.

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

Parameters4/5

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

Schema coverage is 100%, but the description adds meaningful context: files are hints not inlined, images trigger --yolo mode, model guidance (flash vs pro), timeout floor due to CLI startup, and changeMode's structured edit safety. This goes beyond the baseline schema descriptions and helps the agent set parameters effectively.

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

Purpose5/5

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

The description clearly identifies this as an agentic query tool where Gemini runs with read_file, grep, list_directory, and glob tools in the workingDirectory. It lists specific capabilities (code analysis, image understanding, general knowledge, text transformation, change mode) that distinguish it from simpler or sibling tools, even without naming them explicitly.

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

Usage Guidelines4/5

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

The description gives explicit use cases and prerequisites: requires a git working directory, text-only in change mode, gitignored files unreadable in text-query mode, and model selection tips (flash for speed, pro for depth). While it doesn't explicitly compare to sibling tools like search or structured, it implies when this agentic tool is appropriate and notes limitations.

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

Install Server

Other Tools

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/hampsterx/gemini-mcp-bridge'

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