Skip to main content
Glama

gemini_code

Destructive

Delegate a well-defined coding task to Gemini to read and edit files in a local project folder, then review the returned summary and changes with git diff.

Instructions

Delegate a coding task to Gemini, which reads and EDITS files in one local folder through the Antigravity agent on the user's Google AI Pro plan (no API cost). This changes files: tell the user, and review the result afterwards, e.g. with git diff. Gemini can't run terminal commands here, so run the tests yourself afterwards. Antigravity CLI 1.5 can't get approval for file access when it runs headless. Then this tool returns agy's explanation within about a minute and changes nothing; use jules_start instead.

    Good for a well-defined change: fix a bug, add tests, refactor a module.
    For read-only questions use gemini_ask; for a task on a GitHub repo that
    should end in a pull request use jules_start.

    Args:
        task: What to change and how to know it is done, e.g. "Add unit tests
            for parse_date in utils/dates.py; all tests must pass".
        folder: Absolute path of the project folder Gemini may edit.
        model: Model id from gemini_models; omit for agy's default.
        agent: Name of an Antigravity agent from gemini_agents to run the task.
        effort: Reasoning effort: "low", "medium", "high", "xhigh" or "max".
        conversation_id: Continue an earlier gemini_code or gemini_ask chat, e.g.
            to ask for fixes to the previous change.

    Returns:
        Gemini's summary of what it changed, and a conversation_id for follow-up
        requests; or an error if the folder does not exist.
    

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": {
      "task": "<task>",
      "folder": "<folder>"
    },
    "name": "gemini_code"
  }
}

Input Schema

NameRequiredDescriptionDefault
taskYes
agentNo
modelNo
effortNo
folderYes
conversation_idNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.9/5.0
Behavior5/5

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

Annotations flag destructive/openWorld/non-idempotent, but the description adds far more: tell the user, review with `git diff`, Gemini cannot run terminal commands so tests must be run manually, roughly one-minute latency, explicit error when the folder does not exist, and the headless-approval failure mode that silently makes no changes. These are exactly the operational caveats an agent needs before invoking a destructive write tool.

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?

Front-loaded with the action and the file-mutation warning, and the Args/Returns block is well organized. The middle paragraph about Antigravity CLI 1.5 headless approval is awkwardly spliced between the file-change warning and the "use jules_start instead" fallback, costing some readability.

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 destructive six-parameter delegation tool, the definition covers prerequisites (Antigravity agent, Google AI Pro plan, no API cost), side effects, follow-up workflow, failure modes, and return values, with an output schema also present. Nothing an agent needs to call it safely is missing.

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

Parameters5/5

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

Schema coverage is 0%, so the description carries the full burden and does: task (with a concrete done-criteria example), folder (must be absolute), model (from gemini_models, omit for default), agent (from gemini_agents), effort (enum values enumerated), and conversation_id (continues a prior gemini_code or gemini_ask chat). Every one of the six parameters gains meaning beyond its bare title.

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?

"Delegate a coding task to Gemini, which reads and EDITS files in one local folder" gives a specific verb, resource, and scope, and immediately contrasts with gemini_ask (read-only) and jules_start (GitHub PR). An agent can distinguish this from every named sibling without opening a schema.

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?

Explicitly states when to use it (well-defined change: fix a bug, add tests, refactor a module), when not to (read-only questions -> gemini_ask; GitHub-PR tasks -> jules_start), and the degraded headless case where it changes nothing and jules_start should be used instead. All the routing conditions are spelled out rather than implied.

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