gemini_request
Send a prompt to Google's Antigravity CLI via the Gemini-compatible gateway. Handles synchronous execution with automatic deferral to pollable jobs for long-running tasks.
Instructions
Run a Google Antigravity CLI (agy) request through the Gemini-compatible gateway tool synchronously (when async jobs are enabled, auto-defers to a pollable job past the sync deadline; otherwise runs to completion). Requires exactly one of prompt or promptParts.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| yolo | No | Emit `--dangerously-skip-permissions` to auto-approve all actions. Routed through the same approval gate. Under mcp_managed the gate still decides. | |
| model | No | Model name or alias passed to agy --model (e.g. gemini-3-pro-preview, gemini-2.5-flash, pro, flash, latest) | |
| prompt | No | Prompt text for Antigravity CLI (mutually exclusive with promptParts) | |
| project | No | Antigravity 1.0.13 --project <ID>: select the project for this session. Mutually exclusive with newProject. | |
| sandbox | No | Run Antigravity in sandbox mode (--sandbox) | |
| worktree | No | Slice λ: run this request inside a dedicated git worktree owned by the gateway. `true` creates a fresh worktree at `<repoRoot>/.worktrees/<uuid>` branched from HEAD. `{ name?, ref? }` lets the caller supply a sanitized name and/or a git ref (default: HEAD). When the request carries a sessionId and the session already has a worktree, that worktree is reused. The gateway spawns the child CLI with `cwd: <worktree-path>` — no `-w`/`--worktree` flag is ever emitted to the underlying CLI. On session_delete or TTL eviction the gateway runs `git worktree remove --force`. Successful responses are prefixed with `[gateway] worktree=<absolute-path>\n` so callers can use the path. NOTE: callers should `.gitignore` the `.worktrees/` directory in their repo (the gateway does NOT auto-gitignore — see slice λ spec Q4). | |
| sessionId | No | Antigravity conversation ID to resume (emits --conversation <id>). agy owns conversation ids; a fresh request returns no resumable sessionId, continue via resumeLatest:true. | |
| skipTrust | No | Unsupported for Antigravity CLI; true is rejected. | |
| workspace | No | Registered workspace alias for remote HTTP/OAuth provider calls. Do not use this field, workspace_list, or workspace_register_existing_repo as a fallback for stdio/local provider path access; pass workingDir/addDir/includeDirs directly instead. | |
| mcpServers | No | MCP server names accepted for approval tracking only; Antigravity manages its own MCP configuration. | |
| newProject | No | Antigravity 1.0.13 --new-project: create a new project for this session. Mutually exclusive with project. | |
| attachments | No | Unsupported for Antigravity CLI; non-empty values are rejected. | |
| includeDirs | No | Additional workspace directories passed as --add-dir. Stdio/local callers may pass local paths directly. Remote HTTP/OAuth callers must use relative paths inside a selected registered workspace. Do not call workspace_* tools to fix stdio/local provider path access. | |
| policyFiles | No | Unsupported for Antigravity CLI; non-empty values are rejected. | |
| promptParts | No | Cache-aware structured prompt: { system?, tools?, context?, task }. Mutually exclusive with prompt. Stable parts hash into cache_state for prefix-discipline tracking. | |
| allowedTools | No | Unsupported for Antigravity CLI; non-empty values are rejected | |
| approvalMode | No | Approval mode. Only default (prompted) and yolo (auto-approve all, emits --dangerously-skip-permissions) work with the Antigravity agy headless path; auto_edit and plan are rejected at request time (agy has no headless accept-edits/plan mode). | |
| forceRefresh | No | Bypass dedup and force a fresh CLI run even if a recent identical request exists | |
| outputFormat | No | Output format. The Antigravity agy headless path emits text only; json and stream-json are rejected at request time. Per-request token usage and cost are therefore not available for gemini. | text |
| printTimeout | No | Antigravity --print-timeout <DURATION>: print-mode wait timeout as a Go duration string (e.g. '5m0s', '30s'). | |
| resumeLatest | No | Continue the most recent conversation. agy owns conversation ids; a fresh request returns no resumable sessionId, continue via resumeLatest:true. | |
| correlationId | No | Request trace ID (auto if omitted) | |
| idleTimeoutMs | No | Idle timeout in ms (min 30s, max 1h, omit=CLI default) | |
| approvalPolicy | No | Approval policy when approvalStrategy is mcp_managed: strict|balanced|permissive (default balanced). Ignored under legacy strategy. | |
| optimizePrompt | No | Optimize prompt before execution | |
| adminPolicyFiles | No | Unsupported for Antigravity CLI; non-empty values are rejected. | |
| approvalStrategy | No | Approval strategy: legacy (default) lets the provider CLI's own flags decide; mcp_managed routes the run through the gateway approval gate (required for approvalPolicy and approval_list). Under mcp_managed the caller's permissionMode/alwaysApprove may be overridden by the gate. | legacy |
| compressResponse | No | Compress the response display text via the native compressor (default: [compression].enabled in config.toml, off unless opted in). Skipped for structured output. | |
| createNewSession | No | Force new session | |
| optimizeResponse | No | Optimize response output |