Skip to main content
Glama

gemini_query

Offloads token-heavy tasks like analyzing large files, summarizing logs, or getting second opinions to Google Gemini. Attach files as context by absolute path; returns Gemini's text response.

Instructions

Send a query to Google Gemini with optional file context. Use this tool when you need to delegate a task that would consume a large amount of tokens — for example: reading and analyzing a very large file (>1000 lines), summarizing lengthy logs, getting a second opinion on complex analysis, or processing content that exceeds your comfortable context window. Gemini has a very large context window (1M+ tokens) and can handle these tasks efficiently. You can attach files as context by providing their absolute paths. Returns Gemini's text response.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "prompt": "<prompt>"
    },
    "name": "gemini_query"
  }
}

Input Schema

NameRequiredDescriptionDefault
modelNoOverride the default Gemini model. Examples: "gemini-2.5-pro", "gemini-2.5-flash". If omitted, uses the server default (GEMINI_MODEL env var or gemini-2.5-pro).
promptYesThe question, instruction, or task for Gemini. Be specific and detailed for best results.
context_filesNoOptional array of absolute file paths to include as context. The content of these files will be prepended to the prompt. Binary files (images, archives, etc.) are automatically skipped.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.1.0

TDQS

A3.9/5.0
Behavior4/5

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

With no annotations provided, the description carries the full burden and does disclose useful behavior: a 1M+ token context window, that file contents are attached as context, that binary files are skipped, and that a text response is returned. It omits latency, cost, and permission/API-key prerequisites, leaving some operational 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 core action is front-loaded in the first sentence, followed by use cases and file-attachment behavior. It runs longer than strictly necessary, with some redundancy between the use-case list and the closing note about Gemini's context window, but every sentence remains on-topic.

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

Completeness4/5

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

For a three-parameter delegation tool with no output schema, the description covers purpose, typical tasks, file handling, and the return value (Gemini's text response). The remaining gap is operational detail such as latency, cost, or failure behavior for oversized inputs.

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 prompt, model, and context_files thoroughly. The description reinforces that files are given as absolute paths but adds little meaning beyond the schema's own wording, making baseline 3 appropriate.

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 opens with a specific verb and resource ("Send a query to Google Gemini with optional file context"), which tells an agent exactly what the tool does. It doesn't explicitly differentiate from siblings like gemini_analyze or gemini_summarize, whose names imply overlapping capability, so it falls short of a 5.

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?

It gives clear when-to-use guidance with concrete triggers: large files, lengthy logs, second opinions, content exceeding the context window. It stops short of naming when NOT to use it or naming a sibling as the alternative for these tasks, so explicit routing is absent.

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