Skip to main content
Glama

Continue Gemini Session

gemini-reply

Continue an existing Gemini conversation with a follow-up prompt; receive the final response or a job ID to poll for async completion.

Instructions

Continue an existing Gemini conversation. 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 }; poll with gemini-poll. Includes history truncation metadata when older turns are omitted. Throws if the session has a pending job.

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": {
      "sessionId": "<sessionId>",
      "prompt": "<prompt>"
    },
    "name": "gemini-reply"
  }
}

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 follow-up message to send
sessionIdYesSession ID returned by ask-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
historyErrorNo
pollIntervalMsYes
partialResponseNo
historyPersistedNo
historyTruncatedNo
historyTurnCountNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.11.0

TDQS

A4.5/5.0
Behavior5/5

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

Adds substantial behavior beyond the annotations: progress-notification streaming, immediate jobId fallback, polling handoff, history truncation metadata, and the pending-job error condition. The annotations already cover safety profile, and the description adds meaningful runtime semantics.

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?

Front-loads the purpose, then covers progress mode, polling fallback, truncation metadata, and error behavior in compact sentences. Every sentence contributes useful information without repetition.

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, annotations, and output schema, the description supplies the key missing context: streaming versus polling behavior, partial-response handling, truncation metadata, and pending-job failure. An agent can select and invoke it correctly without additional description.

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 baseline is 3. The description adds context about the async progress/jobId flow, but it does not clarify individual parameters such as waitTimeoutMs, cwd, model, or expandRefs beyond what the schema already documents.

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?

Clearly states a specific verb and resource: continue an existing Gemini conversation. It distinguishes this from starting a new conversation and from polling by naming gemini-poll for the async case.

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?

Provides clear operational guidance: if progress notifications are supported, stream partial responses; otherwise return a jobId and poll with gemini-poll. It does not explicitly state when not to use this versus ask-gemini, though the sessionId requirement implies existing-session scope.

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