Continue Gemini Session
gemini-replyContinue 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
| Name | Required | Description | Default |
|---|---|---|---|
| cwd | No | Required 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. | |
| wait | No | If true, block until done and return the response directly (default: false) | |
| model | No | Gemini model to use (e.g. gemini-3-flash-preview, gemini-3-pro-preview). Defaults to CLI default. | |
| prompt | Yes | The follow-up message to send | |
| sessionId | Yes | Session ID returned by ask-gemini | |
| expandRefs | No | Set to false to disable @file reference expansion. Useful when prompts contain framework @ syntax (e.g. Vue @click). | |
| waitTimeoutMs | No | Timeout 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
| Name | Required | Description | Default |
|---|---|---|---|
| jobId | Yes | ||
| response | No | ||
| timedOut | No | ||
| historyError | No | ||
| pollIntervalMs | Yes | ||
| partialResponse | No | ||
| historyPersisted | No | ||
| historyTruncated | No | ||
| historyTurnCount | No |