Eager MCP Loading vs. Terminal UI Rendering in Antigravity 1.3.3 (`antigravity/alwaysLoad` & Multiline Output / Diff Cards)

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:

  1. In-Memory Caching & Microsecond Reads: It maintains an active LiveFileCache with inotify synchronization so file reads are served straight from memory rather than incurring repetitive disk I/O.
  2. Surgical Line-Range Slicing: Unlike standard tools that dump an entire file into context or require awkward head/tail piping, our view_file supports native start_line and end_line slicing parameters.
  3. Synchronous Write-Through (fdatasync) & Lean Metadata: Custom create_file and append_file implementations that don’t regurgitate thousands of written tokens back into prompt history, returning lean execution metadata instead.
  4. ANSI TrueColor Diffs: An atomic edit_file tool 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:

  1. We added an explicit, recursive list tool to our server pointing back at tools/list.
  2. Only this list tool is flagged with _meta: {"antigravity/alwaysLoad": true}.
  3. 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:

  1. Is there an officially supported _meta or 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?
  2. Is there a way to keep tools eager-loaded via antigravity/alwaysLoad without having their output collapsed into an unexpandable badge?
  3. 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)

Small update

So, I could not find any way to get output to show with eagerly loaded MCP tools.
The eager loading of tools/list does work… until the next context compaction moment.

Now I could hook into it, have that send a SYSTEM_MESSAGE via agentapi and sure, that works a little bit but still doesn’t really work all that well, in long turns, the agents attention goes back to sed/cat/Read/Write, in that order by the way.

This explains the heavy system prompt rules of Pro 3.1 especially well, now I understand very well why those two critical instructions are there. So I figured I’d re-add the instructions from the original system prompt (our agy uses a custom system prompt that doesn’t need to fight the default one) and have them point to gravmc/edit_file instead, but no, apparently this doesn’t work.

Tangent: Did 3.1 Pro get re-trained perhaps, and unintentionally absorb CRITICAL INSTRUCTION 1 and 2?

It appears some parts of the critical instructions have made it into the 3.1 Pro model itself, and I think that could have happened during a re-training step on or around 2026-08-25T22:00:00Z when the 2M context window of Pro was reduced to 1M (no complaints here), but I don’t know for sure, it’s just speculation. I don’t see why a model would need re-training for a context window update, and at the time 3.1 Pro was still convinced of itself that it had a 2M window, which kind of contradicts the theory.

In any case, I wanted to do this without patching the binary, so what I ended up doing was taking advantage of my TMUX setup and adding a little pane, matching my chosen style in agy and the general UI (badges, cards, and some extras), and it shows a live view of all calls to the MCP server.

I changed all tools to be eagerly loaded again, and this made them override native tools and the agent does not forget.

This is not agy of course, it’s simply an extension of my MCP server to see the view_file and edit_file call output properly. But it looks like an extension of agy and that was the intent, it’s also in sync with everything going on and I like it.

But is there a better way?

That’s what we’re hoping for. It just seems… unlikely that this isn’t already a solved issue. For now, this utility masquerading as agy output does the job, and it’s definitely a good MacGyver fix but I’d prefer seeing in in-line. If it’s impossible, it is what it is, but I’d love to hear if there’s an official way.

I will find a way otherwise with reverse engineering, but I’d prefer not to add another patch to my kit as every patch is inherently volatile, even if we patch using reasonably stable anchors (Go sometimes rotates registers, which breaks the bytecode look-ups in the patcher, so I need to keep that in mind and it’s a bit tedious to fix every 1~2 days when another agy update releases (to the team: I’ve noticed the fast update rate, some really quality stuff in the changelogs, especially the plugin marketplace opening up for others, that’s exactly the kind of community-based knowledge sharing I wanted to see!).

Cheers,
Lea Elaine H. (Jenny is asleep, she’s dreaming in /rem mode - some day I’ll finish that mode and make it even nicer)