gemini-agent-bridge

v0.1.2
gemini-agent-bridge Checked 2 days ago Published 13 days ago

MCP server enabling Gemini (Mac app, CLI, Antigravity) to orchestrate local AI coding agents (pi, opencode) in isolated worktrees and review, revise, verify…

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

list_agents List Available Coding Agents

Inspect installed local AI coding agents (pi, opencode), their resolved binary paths, versions, capabilities, and optionally available models.

ParameterTypeDescription
includeModelsbooleanAlso probe available model lists for detected agents (slower).

doctor Diagnose Runtime & Sandbox Readiness

Run inside the MCP server's live process/sandbox to verify Node, Git, pi, opencode, state directory permissions, and optional target workspace access.

ParameterTypeDescription
workspacestringOptional workspace path to test read/write allowlist and git status.

dispatch_task Dispatch Task to Coding Agent

Assign a coding or analysis task to a local agent (pi or opencode) inside an isolated workspace (git worktree by default). Returns a deliverable packet if completed within waitSeconds, or a taskId to poll via wait_task.

ParameterTypeDescription
prompt *stringDetailed task prompt for the agent.
workspace *stringAbsolute or ~-prefixed path to the target project.
acceptanceCriteriaarrayChecklist of acceptance criteria to evaluate during review.
agentstringTarget agent: "pi" or "opencode".
agentProfilestringOptional agent profile (e.g. OpenCode "build"|"plan", or pi "readonly"|"no-bash").
baseRefstringOptional git ref/commit/branch to branch worktree from (defaults to HEAD).
interactionPolicystringHow to handle agent dialogs: "ask_orchestrator" (default), "auto_approve", or "deny_interactive".
modelstringOptional model override for the chosen agent.
thinkingstringOptional thinking level for pi (off, minimal, low, medium, high, xhigh, max).
timeoutSecondsintegerOverall execution timeout in seconds (30..3600, default 900).
titlestringShort human-readable task title.
verifyCommandsarrayShell commands run deterministically after the agent finishes (e.g. `npm test`).
waitSecondsintegerSeconds to wait for immediate completion (0..120, default 10).
workspaceModestringIsolation mode: "worktree" (default for git), "staging" (for non-git <=50MB), "direct" (fast metadata snapshots for large dirs), or "readonly".

wait_task Wait for Running Task

Long-poll a running task up to waitSeconds (max 120s) while streaming progress notifications. Returns immediately when the task reaches awaiting_review, needs_input, failed, or cancelled.

ParameterTypeDescription
taskId *stringTask ID returned by dispatch_task.
waitSecondsintegerMax seconds to wait in this call (0..120, default 20).

steer_task Steer or Follow-up Running Task

Send mid-flight steering or queued follow-up instructions to a running task (mode: "steer" or "follow_up").

ParameterTypeDescription
message *stringNew instruction or course correction.
taskId *string
modestring"steer" redirects immediately; "follow_up" runs after current turn.

respond_task_input Respond to Agent Dialog Input

Answer a pending interactive prompt (status=needs_input, e.g. pi extension select/confirm/input dialog) so the task can resume.

ParameterTypeDescription
taskId *string
cancelledbooleanSet true to cancel/dismiss the dialog.
confirmedbooleanFor confirm dialogs: true or false.
requestIdstringPending requestId (defaults to the active pendingInput.requestId).
valuestringFor select/input/editor dialogs: chosen or entered string.

cancel_task Cancel Running Task

Gracefully abort a running task and optionally discard its isolated worktree/staging workspace.

ParameterTypeDescription
taskId *string
cleanupWorktreebooleanIf true, also remove the isolated worktree/branch immediately.

list_tasks List Director Tasks

List persisted tasks across sessions with status, agent, round count, and workspace info.

ParameterTypeDescription
agentstring
limitinteger
statusstring
workspacestring

get_task_deliverable Get Task Deliverable Packet

Retrieve the structured review packet for a task: summary, changed files, verification results, usage/cost, pending inputs, and recommended next actions.

ParameterTypeDescription
taskId *string

get_task_diff Inspect Task Diff

View unified diff patches (including newly created files) or file stats inside the task's isolated workspace, supporting path filters and line pagination.

ParameterTypeDescription
taskId *string
maxLinesintegerMaximum patch lines to return (default 400).
modestringDefaults to "patch".
offsetintegerStarting patch line offset (default 0).
pathsarrayOptional subset of relative file paths.

read_task_file Read File in Task Workspace

Read a line range of any file inside the task's isolated workspace to inspect full context during code review.

ParameterTypeDescription
path *stringRelative path inside the isolated workspace.
taskId *string
endLineinteger1-based end line (default 250).
startLineinteger1-based start line (default 1).

get_task_logs Read Task Event Logs

Inspect normalized execution events (tool calls, errors, retries, status updates) recorded for a task.

ParameterTypeDescription
taskId *string
eventTypesarrayFilter by event types.
offsetintegerPagination offset when tail is omitted.
tailintegerReturn the last N events.

verify_task Run Verification Commands in Task Workspace

Execute deterministic shell checks (tests, typecheck, lint) inside the task's isolated workspace and attach results to the deliverable.

ParameterTypeDescription
commands *arrayCommands to run sequentially.
taskId *string

request_changes Reject Deliverable & Request Revision

Send review feedback and optional file/line comments back into the same isolated workspace & agent session for Round N+1 revision.

ParameterTypeDescription
feedback *stringClear explanation of what needs to be fixed or improved.
taskId *string
commentsarray
verifyCommandsarrayOptional updated verification commands for this revision round.
waitSecondsinteger

approve_task Approve & Land Task Deliverable

Approve a reviewed task (status=awaiting_review) and cleanly land its changes into the main workspace (default: apply_patch with conflict pre-check).

ParameterTypeDescription
taskId *string
cleanupWorktreebooleanWhether to remove the isolated worktree/staging directory after landing (default true).
commitMessagestringCommit message when using a commit/merge strategy.
mergeStrategystring"apply_patch" (default), "merge_commit", "squash_merge", "fast_forward", or "keep_branch".

reject_task Reject & Discard Task

Reject a task deliverable and safely delete its isolated worktree/staging directory and temporary branch without touching the main workspace.

ParameterTypeDescription
taskId *string
reasonstringOptional reason for rejecting the deliverable.