Skip to main content
Glama
antigravity-cli-mcp

antigravity-cli-mcp

by danwahl

cli

Delegate coding tasks, code reviews, and research to a headless Antigravity agent with file, web, and shell access. Returns responses with conversation IDs for follow-ups.

Instructions

Send a task to Antigravity CLI (agy) and return the response. Antigravity runs headlessly with full tool access (file read/write, web search, shell commands) and operates in the working directory you specify via cwd.

When to use this tool:

  • Delegating rote coding tasks: boilerplate generation, repetitive refactors, bulk edits across many files

  • Getting a second opinion: code review, architecture feedback, sanity-checking an approach

  • Research and brainstorming: Antigravity has web search and a large context window, useful for exploring options or summarizing docs

  • Large file analysis: processing files that would be expensive to handle directly

  • Parallel workstreams: offloading independent subtasks while you continue other work

Sandbox: on by default. Antigravity's file tools can still edit the workspace, but shell commands can only write under /tmp. Set sandbox: false for tasks whose shell commands must write to the workspace (builds, installs, git commits, test runs that produce files).

Conversation resumption: each response includes a conversationId. Pass it back via the conversationId parameter (with the same cwd) to continue a conversation without re-sending context — useful for multi-step tasks or follow-up questions.

Keep prompts self-contained: include all necessary context in the prompt since Antigravity has no access to your conversation history or MCP state.

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": {
      "prompt": "<prompt>",
      "cwd": "<cwd>"
    },
    "name": "cli"
  }
}

Input Schema

NameRequiredDescriptionDefault
cwdYesAbsolute path to the working directory (workspace) for Antigravity to operate in
modeNoAgent execution mode. "plan" drafts an implementation plan before acting; in headless mode the plan is auto-approved, so this shapes the workflow but does not prevent edits.
agentNoName of a custom agent to run, defined at .agents/agents/<name>.md in the workspace or ~/.gemini/config/agents/. Omit for the default agent.
modelNoModel to use. Omit to use Antigravity's default. Examples: "gemini-3.1-pro-high", "gemini-3.1-pro-low", "gemini-3.8-flash-medium", "claude-sonnet-4-6", "claude-opus-4-6-thinking". Run `agy models` for the full list.
effortNoReasoning effort for the session. Omit to use Antigravity's default.
promptYesThe task or question to send to Antigravity CLI
sandboxNoRun shell commands in a sandbox where they can read anywhere but write only under /tmp. File edit tools are unaffected. Default: true.
timeoutNoTimeout in seconds. Default: 120. Increase for complex multi-step tasks. On expiry the call returns an error with any partial response in the structured output.
jsonSchemaNoJSON Schema to enforce on the final answer. The parsed object is returned in `structuredOutput`.
conversationIdNoResume a previous conversation by ID. The ID is returned in the structured output of each call. Conversations are scoped to a workspace, so pass the same `cwd` as the original call.

Output Schema

NameRequiredDescriptionDefault
usageYesToken usage for this turn
statusYesRun status reported by agy (e.g. SUCCESS)
numTurnsYesNumber of agent turns in the conversation
responseYesAntigravity's text response
deniedActionsYesTools agy was denied permission to use
conversationIdYesAntigravity conversation ID
durationSecondsYesWall-clock time of the run
structuredOutputYesParsed answer when `jsonSchema` was given

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.3.2

TDQS

A4.7/5.0
Behavior5/5

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

Annotations only declare readOnlyHint=false and openWorldHint=true; the description adds substantial context beyond them — the default sandbox limits shell writes to /tmp while file-edit tools remain unaffected, timeouts return partial output, conversations are workspace-scoped, and Antigravity has no access to the caller's history or MCP state. It also warns the agent to write self-contained prompts, which is a real behavioral constraint on correct invocation.

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-loads the one-line purpose, then organizes the rest under labeled blocks (When to use, Sandbox, Conversation resumption), so an agent can skim to the needed section. Slightly verbose where sandbox reasoning restates the schema's own `sandbox` description, but no sentence is wasted in a way that obscures the guidance.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 10-parameter, non-read-only, open-world tool that executes arbitrary shell commands, the description covers the risky surfaces: sandbox semantics, timeout behavior with partial results, resumption pairing, and prompt self-containment, while the output schema covers return shape. It lacks any explicit 'when not to use this' or cost/latency expectation for expensive delegations, which is the remaining gap.

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 earns above that by explaining cross-parameter dependencies the schema states only in isolation — `conversationId` must be paired with the same `cwd` as the original call to resume without re-sending context, and `cwd` is the operative workspace. It does not add much for `mode`, `agent`, `model`, or `effort`, which rely entirely on their schema text.

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?

States a specific verb and resource ('Send a task to Antigravity CLI (agy) and return the response') and immediately defines the executor by its capabilities: headless operation with file read/write, web search, and shell access in a caller-specified `cwd`. An agent knows exactly what class of operation this is without opening the 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?

A dedicated 'When to use this tool' block enumerates five concrete delegation scenarios (rote coding, second opinion, research, large file analysis, parallel workstreams), plus conditional guidance for turning off the sandbox for builds/installs/git commits and for resuming via `conversationId`. This is explicit when-to-use guidance with the conditions that select each behavior.

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

Deploy Server

Other Tools