gemini_prompt
Send detailed prompts to Gemini CLI, choose models by task complexity, and continue multi-turn sessions with session_id. Returns response text, model used, and session ID.
Instructions
Send a detailed prompt to the Gemini CLI. Returns response text, model used, and session_id.
MODEL SELECTION:
Default work → gemini-3-flash-preview (fast, capable, most tasks)
Complex work → gemini-3.1-pro-preview (deep reasoning, architecture, hard bugs)
Bulk/batch work → gemini-2.5-flash-lite (fastest, cheapest, high-volume tasks)
SESSION CONTINUITY: First call returns a session_id. Pass it back on the next call to continue the conversation. Gemini persists session history to disk — context is preserved across calls.
ALWAYS write detailed prompts. Include file paths, numbered steps, and output format.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| model | No | Gemini model to use. Choose based on task complexity: 'gemini-3-flash-preview' — DEFAULT. Fast and capable. Use for: Q&A, code review, summaries, single-file edits, writing. 'gemini-3.1-pro-preview' — COMPLEX tasks requiring deep reasoning: architecture design, multi-file refactors, subtle bug analysis, long-form analysis. 'gemini-2.5-flash-lite' — BULK tasks: batch processing, repetitive lookups, classification, tasks run in a loop where speed and cost matter most. Other valid values: 'gemini-2.5-pro', 'gemini-2.5-flash', 'gemini-3.1-flash-lite-preview'. | gemini-3-flash-preview |
| prompt | Yes | The full, detailed prompt for Gemini. ALWAYS write in detail — never vague. Rules: (1) Include exact file paths for any files involved. (2) Number each step when asking for multi-step work. (3) Specify the exact output format: 'return a JSON object with keys X, Y, Z', 'return a markdown table', 'return only the fixed code block'. (4) Paste the relevant code, error message, or data directly into the prompt — do not say 'the error' without including it. Example GOOD: 'Review the following Python function and identify any bugs. Return a JSON array where each item has fields: line (int), issue (str), fix (str). Function: def calc(x, y): return x / y' Example BAD: 'Review my function.' | |
| session_id | No | Resume a previous Gemini session by its ID (from a prior gemini_prompt response). Leave empty to start a fresh session. Pass the same session_id on every subsequent turn of a multi-turn conversation. | |
| project_dir | No | Absolute path to the working directory for this call. Set this when your prompt references files in a specific project. Example: 'C:/Users/User/projects/myapp'. Defaults to current directory. | |
| timeout_seconds | No | Seconds to wait for a response. Increase to 300 for gemini-3.1-pro-preview on complex tasks. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||