@devries-cameron20 / t3code Mirror · read-only / commits / 7f928416b2
Fork 0

The best way to control Claude Code, Codex and more from any computer or phone

Mirrored from https://github.com/Camo67/t3code.git

Synced Nov 21, 04:45 UTC

fix(antigravity): MCP calls through call_mcp_tool show the tool, not "Ran command" (#39474)

Co-authored-by: Julius Marminge <julius0216@outlook.com>

Hayden committed Nov 19, 2026 at 22:43 UTC 7f928416b22347b9562ed1a9c3cac1e1719999b8
2 files changed +30
packages/provider-acp/src/server/runtimeModel.test.ts
+22
@@ -1381,6 +1381,28 @@ describe("extractMcpToolCallIdentity", () => {
1381 });
1382 });
1383
1384 + it("recovers server, tool, and arguments from Antigravity call_mcp_tool calls", () => {
1385 + // agy 1.5.12 reaches MCP tools its context budget left out through call_mcp_tool.
1386 + const toolCall = toolCallFromUpdate({
1387 + sessionUpdate: "tool_call",
1388 + toolCallId: "call_13347576314095519317",
1389 + kind: "execute",
1390 + title: "MCP Tool navigate_page",
1391 + status: "in_progress",
1392 + rawInput: {
1393 + ServerName: "chrome-devtools",
1394 + ToolName: "navigate_page",
1395 + Arguments: { url: "https://example.com" },
1396 + },
1397 + });
1398 +
1399 + expect(extractMcpToolCallIdentity(toolCall)).toEqual({
1400 + server: "chrome-devtools",
1401 + tool: "navigate_page",
1402 + input: { url: "https://example.com" },
1403 + });
1404 + });
1405 +
1406 it("recovers T3 identity from acp-mcp-call fallback commands", () => {
1407 const toolCall = toolCallFromUpdate({
1408 sessionUpdate: "tool_call",
packages/provider-acp/src/server/runtimeModel.ts
+8
@@ -1139,6 +1139,14 @@ export function extractMcpToolCallIdentity(
1139 if (meta?.is_mcp_tool_call === true && server.length > 0 && tool.length > 0) {
1140 return { server, tool };
1141 }
1142 + // Antigravity reaches MCP tools its context budget left out through call_mcp_tool, an execute
1143 + // call titled "MCP Tool <tool>" whose rawInput names the server, tool, and arguments.
1144 + const proxiedServer = typeof rawInput?.ServerName === "string" ? rawInput.ServerName.trim() : "";
1145 + const proxiedTool = typeof rawInput?.ToolName === "string" ? rawInput.ToolName.trim() : "";
1146 + if (proxiedServer.length > 0 && proxiedTool.length > 0) {
1147 + const input = isRecord(rawInput?.Arguments) ? rawInput.Arguments : undefined;
1148 + return { server: proxiedServer, tool: proxiedTool, ...(input === undefined ? {} : { input }) };
1149 + }
1150 // Kiro names the server in `_meta.kiro.serverName` and the call in `rawInput.tool_id`
1151 // ("<server>::<tool>"), with the tool's own input under `rawInput.arguments`.
1152 const kiroServer = isRecord(meta?.kiro) ? meta.kiro.serverName : undefined;