Skip to main content
Glama

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

TableJSON Schema
NameRequiredDescriptionDefault
modelNoGemini 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
promptYesThe 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_idNoResume 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_dirNoAbsolute 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_secondsNoSeconds to wait for a response. Increase to 300 for gemini-3.1-pro-preview on complex tasks.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

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. It discloses key behavioral traits: output contents, session_id creation, disk persistence, and context preservation across calls. It does not mention authentication or rate limits, but the disclosed session behavior and return format go beyond a vague 'sends a prompt'.

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 description is well-structured with clear sections (MODEL SELECTION, SESSION CONTINUITY) and a front-loaded one-sentence summary. It is longer than average but every section serves a purpose, and the formatting makes it scannable. Minor redundancy with the schema prevents a 5.

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?

The tool has 5 parameters, an output schema, and no annotations. The description covers purpose, model selection, session continuity, and prompt requirements comprehensively. It does not need to explain return values because an output schema exists. This is a complete, self-sufficient description for an agent to successfully invoke the tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the baseline is 3. The description adds value by summarizing model-choice semantics in a dedicated section and emphasizing the prompt-writing rules, even though the schema also details these. It also adds the output contract ('Returns response text, model used, and session_id') which is not in the schema.

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?

The description opens with a specific verb+resource: 'Send a detailed prompt to the Gemini CLI. Returns response text, model used, and session_id.' This clearly identifies the tool's function and distinguishes it from siblings like opencode_send_message and qwen_prompt.

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?

The description provides detailed context for model selection by task complexity (default, complex, bulk) and explains session continuity, which serves as practical usage guidance. However, it does not explicitly compare against sibling tools like qwen_prompt or opencode_send_message, so it stops short of a full when/when-not explanation.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/h19overflow/polycode'

If you have feedback or need assistance with the MCP directory API, please join our Discord server