PR #1310 — Fleet Parity: Agy Stitch MCP Integration, Diagnostics, and Prompt Guidance
PR #1310 — Fleet Parity: Agy Stitch MCP Integration, Diagnostics, and Prompt Guidance
The Broader Goal at the End of the Previous PR
PR #1309 closed issue #347, completing the entire original fleet parity cluster (#332, #338, #340, #342, #347, #348, #419, #461). Next on the roadmap was issue #573: investigating and resolving why Agy (Google Antigravity CLI) was reported unable to invoke Stitch MCP tools in headless dispatches.
What Was Missing & The Real Root Cause
- Configuration Gap: Stitch had been installed via the Gemini CLI extension installer (
gemini extensions install https://github.com/gemini-cli-extensions/stitch), which placed extension metadata under~/.gemini/extensions/Stitch/. Butsynlynk dispatch agyinvokes the Antigravity CLI (agy), which does not read~/.gemini/extensions/. Antigravity loads MCP servers exclusively from~/.gemini/config/mcp_config.json, which was empty. - Tool Invocation Paradigm Mismatch: Prompts assumed the Claude Code convention of flat, prefixed tool names (
mcp__stitch__*). In Antigravity CLI, MCP tools are invoked through the built-in meta-toolcall_mcp_tool(server="stitch", tool="<tool_name>", arguments={...}). - Live Verification: Once
stitchwas added to~/.gemini/config/mcp_config.json(npx -y stitch-mcp@1.0.0with projectgen-lang-client-0187568210), live headless dispatch verified thatcall_mcp_toolexecuted without permission prompts, successfully returning live Stitch projects.
What Shipped
- Capability Baseline Update: Added
stitch.googleapis.com:443to optional network endpoints for Agy insynlynk/_constants.py. - TC-8 Doctor Preflight: Added
_run_tc8()insynlynk/doctor.pyasserting that~/.gemini/config/mcp_config.jsonhas an active, enabledstitchserver configuration. - Doctor Auto-Remediation: Added
_build_agy_stitch_fix_plan()tosynlynk doctor --fix agyfor one-command remediation. - Dispatch Preflight & Prompt Adaptation:
- Enforced
--requires stitch/--requires mcpchecks insynlynk/dispatch.py:_preflight_dispatch(). - Injected the
## Stitch MCP Tool Usage Notereminding Agy to invokecall_mcp_toolwhenever Stitch is referenced.
- Enforced
- Tests: Added comprehensive unit tests in
tests/test_synlynk.pyandtests/test_dispatch.py. All 504 tests pass.