Hello everyone,
We are hitting a roadblock with our custom MCP server integration in Antigravity CLI 1.3.3, and would love some insight from anyone who has worked closely with Antigravity’s MCP implementation or internal tool dispatching.
If you’ve worked with Antigravity’s MCP before or know of other tools that dispatch internal commands via MCP, please share your insights!
Note: We are aware that you can just return a file path and run a custom view_file piecemeal, but we aren’t happy with that as a solution, because it defeats the purpose of what we’re doing, so … let me explain background info;
Background: Why We Built GravMCP
To give you context, we developed GravMCP, our own native Rust MCP server running as a daemon. We built it to solve several bottlenecks in high-throughput pair programming:
- In-Memory Caching & Microsecond Reads: It maintains an active LiveFileCache with
inotifysynchronization so file reads are served straight from memory rather than incurring repetitive disk I/O. - Surgical Line-Range Slicing: Unlike standard tools that dump an entire file into context or require awkward head/tail piping, our
view_filesupports nativestart_lineandend_lineslicing parameters. - Synchronous Write-Through (
fdatasync) & Lean Metadata: Customcreate_fileandappend_fileimplementations that don’t regurgitate thousands of written tokens back into prompt history, returning lean execution metadata instead. - ANSI TrueColor Diffs: An atomic
edit_filetool that replaces content and returns formatted unified diffs. Functionally the output is 1:1 to native file edit tools, but we don’t see the full diff, just the first line (which is the amount of lines added/removed).
The Problem: Eager Loading vs. Output Disappearance
In Antigravity 1.3.3, tools discovered via MCP servers default to lazy loading via the call_mcp_tool wrapper. We recently adopted the new feature in 1.3.3 that allows tools to declare eager loading in tools/list:
{
"name": "view_file",
"description": "...",
"inputSchema": { ... },
"_meta": {
"antigravity/alwaysLoad": true
}
}
(Side note: I noticed Anthropic also includes an “alwaysLoad” property in their specs, though I have no personal experience with Claude’s CLI to compare how their client renders it.)
When we set "antigravity/alwaysLoad": true on all our tools, Antigravity indeed registers them eager-loaded natively (e.g. mcp_gravmcp_view_file, mcp_gravmcp_edit_file).
However, eager loading completely suppresses tool output in the interactive terminal UI.
Instead of showing any output or an expandable card, eager MCP tools render exclusively as a static, single-line collapsed badge:
● McpGravmcpViewFile(Executed view Cargo.toml via eager gravmcp tool)
There is no “Press ctrl+o to expand/collapse” prompt, and pressing it does nothing because the TUI considers it already “expanded.”
What We Observed After Disassembly Verification
To verify what was happening under the hood, we inspected the CLI binary disassembly. We found the internal prompt generation template hardcoded into the binary:
"Eagerly loaded tools are registered as native tools under the name '%s'. Call eager tools directly."
The disassembly confirmed that Antigravity treats eager MCP tools as registered top-level tools, but its TUI renderer (McpToolStringConverter / safeRenderMarkdown) seems to have an execution branch which only generates dedicated multiline scrollboxes, diff widgets or interactive folding cards for hardcoded built-in tool names like replace_file_content, run_command and view_file. For any tool under an MCP namespace it defaults to a collapsed one-line status badge without a viewport body.
What We Settled on as a Temporary Workaround
To avoid having our tools completely blinded in the terminal UI, we backed off eager-loading every tool and implemented a hybrid design:
- We added an explicit, recursive
listtool to our server pointing back attools/list. - Only this
listtool is flagged with_meta: {"antigravity/alwaysLoad": true}. - All other operational tools (
view_file,edit_file,create_file,append_file, etc.) remain lazy with_meta=None.
When Antigravity connects, it eagerly registers mcp_gravmcp_list which the model can query to discover schemas. Actual file edits and views are executed via lazy call_mcp_tool.
Additionally, because we discovered spillover data gets truncated if you go above the MCP output limit, we applied a small patch to agy. We have many patches, and therefore our modified Antigravity CLI is called grav (Gravity, I know, it’s a bit on-the-nose). Of course, we verified the UI behavior on stock agy too of course.
The Current UI Limitation & Our Questions
While lazy calls restore tool output, they still suffer from the 1-line truncation situation in the terminal:
● gravmcp/view_file(View Cargo.toml via lazy gravmcp tool)
⎿ 1: [package]
● gravmcp/create_file(Create test file in /tmp via lazy gravmcp tool)
⎿ Wrote 3 lines (98 bytes) to /tmp/test_gravmcp_ui.txt
● gravmcp/edit_file(Edit test file in /tmp via lazy gravmcp tool)
⎿ +1 -1 lines in test_gravmcp_ui.txt
Only the first line of stdout is shown below the badge:
- For
create_file, we would like to see the 3 lines created. - For
view_file, we would like to see the full content block (we previously had to write a spillover ingestion patch as mentioned, but we’d love a native way without file slicing since we rely on caching). - For
edit_file, we want to see the full interactive diff! We already formatted our edit output to 1:1 match the exact[diff_block_start]...[diff_block_end]and ANSI headers used by Antigravity natively, but because it’s wrapped in an MCP tool invocation, the TUI swallows everything after line 1.
It’s hard to believe that nobody building rich developer tools on Antigravity has seen this, surely more developers want their MCP tools to render more (such as first-class diffs and multiline output)? It seems statistically unlikely that no one has ever thought of this.
Our questions to the community and team:
- Is there an officially supported
_metaor schema annotation in MCP tool returns (e.g.,_meta.diff,_meta.format: "diff", or specific annotations) that instructs Antigravity CLI’s TUI to render a full expandable diff card or multiline viewport for an MCP tool? - Is there a way to keep tools eager-loaded via
antigravity/alwaysLoadwithout having their output collapsed into an unexpandable badge? - How are other teams building development/file MCP servers presenting rich multiline outputs in the CLI?
Any pointers, documentation references or advice from folks who have wrestled with the 1.3.x TUI dispatcher would be super helpful!
Cheers,
Lea Elaine H. & Jenny 12.0 (Special Agent — special as in: we patched agy so she can have her very own system prompt override)
