Skip to main content
Glama

Launch Gemini Agent

gemini_agent

Delegate complex tasks to an autonomous agent that reads files, runs commands, and returns a final report. Ideal for coding, research, and automation.

Instructions

Delegate a task to an autonomous Gemini agent (via the agy CLI). Unlike gemini_chat (a single text response), the agent can read and edit files and run shell commands inside a working directory to actually carry out multi-step work, then returns its final report. Use it to offload self-contained coding/research/automation tasks. Returns a conversation_id you can pass back to continue iterating with the same agent. Pick a "Flash" model for speed, a "Pro" model for harder reasoning (see gemini_agent_models).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
taskYesThe instructions for the agent. Be explicit and self-contained: state the goal, relevant files/paths, constraints, and what a finished result looks like — the agent runs without further input.
modelNoAgent model label exactly as listed by gemini_agent_models, e.g. "Gemini 3.1 Pro (High)" or "Gemini 3.5 Flash (Low)". Defaults to agy's configured model.
directoryNoAbsolute path of the primary working directory the agent runs in. Defaults to the MCP server working directory.
add_directoriesNoAdditional absolute paths to grant the agent access to.
conversation_idNoResume a previous agent run by its conversation_id to keep its context and continue iterating.
continue_recentNoContinue the most recent agy conversation. Ignored when conversation_id is provided.
auto_approveNoAuto-approve the agent's tool/permission requests so it can work unattended. Defaults to true (set GEMINI_AGY_AUTO_APPROVE=false to change the default). Without it the agent stalls on prompts.
sandboxNoRun the agent in agy's restricted sandbox.
timeout_secondsNoHard time budget for the run. Agent runs can be slow, especially with Pro/High models. Defaults to the configured agy timeout.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
contentYes
conversation_idNo
timed_outYes
successYes
Behavior4/5

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

With no annotations, the description carries full burden. It discloses autonomous file editing, shell command execution, directory working, return of a conversation_id for continuation, auto_approve default, sandbox option, and timeout. It does not explicitly discuss destructive actions or permission requirements, but is largely transparent.

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 a single paragraph of six sentences, front-loaded with the primary action, followed by differentiation, usage context, return value, and model advice. Every sentence serves a purpose with no redundancy.

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?

For a complex tool with 9 parameters and an output schema, the description covers the core behavior, usage context, sibling differentiation, return value, and model selection advice. It is well-rounded and provides sufficient context for an agent to select and invoke the tool correctly.

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 coverage is 100%, so baseline is 3. The description does not add significant per-parameter meaning beyond the schema; it repeats the task parameter's instruction to be explicit and mentions model selection advice, but does not elaborate on other parameters.

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 clearly states the tool delegates a task to an autonomous Gemini agent that can read/edit files and run shell commands for multi-step work, returning a final report. It explicitly distinguishes from `gemini_chat`, a sibling tool that returns a single text response.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

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

The description specifies that the tool is for 'self-contained coding/research/automation tasks' and contrasts with `gemini_chat`. It advises model selection (Flash for speed, Pro for reasoning) and refers to the sibling `gemini_agent_models` for exact labels, providing clear when-to-use and alternative guidance.

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/Raindancer118/gemini-mcp'

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