Skip to main content
Glama

Ask Gemini

ask-gemini

Start a Gemini conversation to request on-demand code review, second opinions, or long-file analysis, with streaming or async job polling for MCP clients.

Instructions

Start a new conversation with Gemini. If the MCP client supports progress notifications (progressToken present), blocks and streams partial responses as notifications/progress events, then returns the final response inline. Otherwise returns immediately with { jobId, sessionId }; poll with gemini-poll or cancel with gemini-cancel.

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": "ask-gemini"
  }
}

Input Schema

NameRequiredDescriptionDefault
cwdNoRequired when the prompt contains 2 or more @file references. A single @file ref is resolved by the CLI without cwd. If cwd is omitted with 2+ @file refs and the client supports elicitation, you will be prompted to provide it.
waitNoIf true, block until done and return the response directly (default: false)
modelNoGemini model to use (e.g. gemini-3-flash-preview, gemini-3-pro-preview). Defaults to CLI default.
promptYesThe prompt to send to Gemini
expandRefsNoSet to false to disable @file reference expansion. Useful when prompts contain framework @ syntax (e.g. Vue @click).
waitTimeoutMsNoTimeout for wait mode in ms (default 90000). On timeout, returns timedOut: true with partialResponse; the job continues running and can be polled with gemini-poll.

Output Schema

NameRequiredDescriptionDefault
jobIdYes
responseNo
timedOutNo
sessionIdYes
historyErrorNo
pollIntervalMsYes
partialResponseNo
historyPersistedNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.11.0

TDQS

A3.9/5.0
Behavior4/5

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

The annotations already declare readOnlyHint=false, openWorldHint=true, idempotentHint=false, and destructiveHint=false, so the safety profile is covered. The description adds substantial behavioral context beyond annotations: progress notification streaming, blocking vs immediate return, the { jobId, sessionId } fallback shape, and the polling/cancel path. It does not discuss permissions, cost, or side effects of starting a conversation, but with annotations present this is a strong disclosure.

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 front-loaded with the core action in the first sentence, then efficiently describes the two execution modes and the fallback. Every sentence earns its place, and there is no redundant or filler language.

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?

Given the tool's complexity (open-world, async/streaming, six parameters, existing output schema, and annotations), the description covers the essential behavior an agent needs: how execution proceeds, how to obtain results, and where to poll or cancel. Return-value details can be deferred to the output schema, and parameter details are covered by the fully described input schema.

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 six parameters in detail. The description does not add meaning to individual parameters such as wait, model, cwd, expandRefs, or waitTimeoutMs; it only mentions progressToken as a client capability and jobId/sessionId as return values. The baseline of 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 states a specific verb and resource: 'Start a new conversation with Gemini.' It partially differentiates from siblings by naming gemini-poll and gemini-cancel for async continuation, and 'new conversation' implicitly contrasts with gemini-reply. However, it does not explicitly contrast with gemini-reply for continuing an existing conversation or with gemini-batch, so it falls short of 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 Guidelines3/5

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

The description implies when to use this tool through 'Start a new conversation' and gives concrete follow-up alternatives ('poll with gemini-poll or cancel with gemini-cancel'). It does not explicitly state when to choose ask-gemini over gemini-reply or gemini-batch, nor does it give exclusions. The usage guidance is implied rather than spelled out.

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