Reports

#7997 · ACP schema catalog delivery

BugPriority: MediumEffort: Mediumproviders · provider-acp GitHub issue2026-11-21

Trusted base: 35a03bbbb3f4d8dc814c1a152db5a463102b4250

Verdict: NOT REPRODUCED · Root-cause confidence: low

1. TL;DR

The reported symptom is that an ACP provider does not expose some plugin tools to its agent. A direct MCP transport check against unchanged trusted main returned every supplied tool, including schemas containing text, numeric, array and nested constraints. The real ACP bridge subprocess preserved all seven schemas, and the same check passed from a second clean checkout. Antigravity itself is not installed in this environment, so its schema ingestion and the reported per-thread tool inventory remain unverified. This is not evidence that the provider-specific symptom is absent; it means a root-cause fix is not yet supported.

2. Claims vs findings

ClaimFindingEvidence
Constrained plugin tools disappear in the reported provider session.UnverifiedNo matching provider installation or session was available. The transport probe does not simulate that provider.
Validation keywords could explain selective tool loss.Unverified hypothesisThe bridge advertises constrained schemas unchanged. A real MCP SDK client accepts all seven definitions; this does not establish Antigravity compatibility.
The bridge removes tools because they contain these constraints.Not observed at the tested boundarySeven definitions in, seven definitions out, with exact schema equality in both runs. This only covers tools supplied in the dynamic catalog, not upstream tool selection.
Every plugin call is independently checked against a full parameter schema.Not generally trueTrusted source retains Zod validation, but plain JSON Schema registration installs an identity parser. Individual tool implementations may still validate independently.

3. Environment

4. Minimal reproduction attempt

Save the complete script below as catalog.mjs outside the checkout. It loads the production bridge builder and launches the real --mcp-stdio entry point, not a reimplementation. A small loopback peer acknowledges only initialization; an actual MCP SDK client requests the catalog. No provider tool-rejection behavior is mocked.

git clone https://github.com/get-bb/bb.git bb-7997-base
cd bb-7997-base
git checkout --detach 35a03bbbb3f4d8dc814c1a152db5a463102b4250
pnpm install --frozen-lockfile --prefer-offline
pnpm exec turbo run build --filter=@bb/process-utils
node --conditions=source --import ./node_modules/tsx/dist/loader.mjs ../catalog.mjs "$PWD"
pnpm exec turbo run test --filter=@bb/provider-bridge-acp -- tool-proxy-mcp.test.ts

Expected healthy transport: all seven supplied definitions are returned with identical schemas. Expected if the bridge itself loses constrained definitions: an assertion failure due to missing definitions or changed schemas. Actual first run:

advertised=7 received=7
plain_text: schema preserved
bounded_text: schema preserved
matched_text: schema preserved
bounded_number: schema preserved
exclusive_number: schema preserved
bounded_list: schema preserved
nested_text: schema preserved
PASS: real ACP MCP subprocess lists every constrained tool without schema loss

The existing bridge test file also passed: Test Files 1 passed (1); Tests 9 passed (9). The probe passes on unchanged main; it is a boundary observation, not a failing regression test or an end-to-end reproduction.

Complete repeatable transport probe
import assert from "node:assert/strict";
import { createRequire } from "node:module";
import { createServer } from "node:net";
import { resolve } from "node:path";
import { pathToFileURL } from "node:url";

const checkout = resolve(process.argv[2]);
const packageRoot = resolve(checkout, "packages/provider-bridge-acp");
const requireFromPackage = createRequire(resolve(packageRoot, "package.json"));
const { Client } = await import(pathToFileURL(requireFromPackage.resolve("@modelcontextprotocol/sdk/client/index.js")));
const { StdioClientTransport } = await import(pathToFileURL(requireFromPackage.resolve("@modelcontextprotocol/sdk/client/stdio.js")));
const { buildAcpMcpServerConfig } = await import(pathToFileURL(resolve(packageRoot, "src/bridge/tool-proxy-mcp.ts")));

const constraints = [
  ["plain_text", { type: "string" }],
  ["bounded_text", { type: "string", minLength: 2, maxLength: 12 }],
  ["matched_text", { type: "string", pattern: "^[A-Z]+$" }],
  ["bounded_number", { type: "number", minimum: 2, maximum: 12 }],
  ["exclusive_number", { type: "number", exclusiveMinimum: 2, exclusiveMaximum: 12 }],
  ["bounded_list", { type: "array", minItems: 2, maxItems: 4, items: { type: "string", maxLength: 12 } }],
  ["nested_text", { type: "object", properties: { label: { type: "string", maxLength: 12 } } }],
];
const tools = constraints.map(([name, schema]) => ({
  name,
  description: `Catalog transport probe ${name}`,
  inputSchema: { type: "object", properties: { value: schema }, required: ["value"] },
}));
const sockets = new Set();
const server = createServer((socket) => {
  sockets.add(socket);
  socket.once("close", () => sockets.delete(socket));
  socket.on("error", () => {});
  let buffer = "";
  socket.setEncoding("utf8");
  socket.on("data", (chunk) => {
    buffer += chunk;
    if (!buffer.includes("\n")) return;
    const request = JSON.parse(buffer.slice(0, buffer.indexOf("\n")));
    assert.equal(request.kind, "initialized");
    assert.equal(request.toolCount, tools.length);
    socket.end(`${JSON.stringify({ ok: true, content: "" })}\n`);
  });
});
await new Promise((resolveListen) => server.listen(0, "127.0.0.1", resolveListen));
const address = server.address();
assert.ok(address && typeof address !== "string");
const config = buildAcpMcpServerConfig({
  bridgeArgs: ["--conditions=source", "--import", requireFromPackage.resolve("tsx"), resolve(packageRoot, "src/bridge/bridge.ts"), "--mcp-stdio"],
  command: process.execPath,
  dynamicTools: tools,
  host: "127.0.0.1",
  port: address.port,
  runtimeEnv: [],
  threadId: "catalog-probe",
  token: "local-probe-only",
});
const transport = new StdioClientTransport({
  command: config.command,
  args: config.args,
  env: { ...process.env, ...Object.fromEntries(config.env.map(({ name, value }) => [name, value])) },
  stderr: "pipe",
});
const client = new Client({ name: "catalog-observer", version: "1.0.0" });
try {
  await client.connect(transport);
  const result = await client.listTools();
  assert.deepEqual(result.tools, tools);
  console.log(`advertised=${tools.length} received=${result.tools.length}`);
  for (const tool of result.tools) console.log(`${tool.name}: schema preserved`);
  console.log("PASS: real ACP MCP subprocess lists every constrained tool without schema loss");
} finally {
  await client.close();
  for (const socket of sockets) socket.destroy();
  await new Promise((resolveClose) => server.close(resolveClose));
}

5. Root-cause analysis and limits

The reported root cause is not established. The production MCP configuration and catalog-loading path writes the dynamic tools to a private file, then reads them through the domain schema. The tools/list handler maps every loaded tool without filtering and sends its original parameter schema:

case "tools/list":
  writeResult(message.id, {
    tools: env.tools.map((tool) => ({
      name: tool.name,
      description: tool.description,
      inputSchema: tool.inputSchema,
    })),
  });
  return;

This explains why constraints remain visible at the transport boundary. It does not show whether the original tools were selected upstream or whether the provider rejects them downstream. Successful MCP initialization alone cannot distinguish these possibilities.

An important safety constraint for any later compatibility change is in plugin parameter normalization: Zod parameters receive a safeParse validator, but plain JSON Schema parameters receive parse = (input) => ({ ok: true, value: input }). The execution path invokes that parser before executing. Therefore removing advertised validation keywords for every plugin is not automatically equivalent to preserving independent validation for every tool. This is a static source finding, not a demonstrated cause of the missing-tool symptom.

6. Proposed next experiment and fix decision

Capture the actual catalog handed to an installed Antigravity session, its raw MCP tools/list response, and the provider's post-ingestion tool inventory. Compare an independently registered constrained tool with an otherwise equivalent unconstrained control through that real client. If the constrained definition is present on the wire but absent after ingestion, investigate the client's supported schema subset and explicit rejection diagnostics. If absent on the wire, inspect upstream tool eligibility instead.

No production change or pull request is safe now: the reported failure was not reproduced on trusted main, the external client is unavailable, and there is no red-before/green-after regression test. A broad schema-stripping change would also alter the advertised schema contract and is outside the simple-fix rule. No linked open pull request was found in issue timeline metadata or the open-PR search for this issue number.

7. Verification

The same agent created a second clean temporary detached checkout at 35a03bbbb3f4d8dc814c1a152db5a463102b4250, performed a separate frozen install, and ran the identical saved script against that checkout. A fresh loopback port and fresh private temporary tool directory were allocated. The checkout remained free of tracked changes. This was a second run by the same agent, not independent verification.

pnpm install --frozen-lockfile --prefer-offline
pnpm exec turbo run build --filter=@bb/process-utils
node --conditions=source --import ./node_modules/tsx/dist/loader.mjs ../catalog.mjs "$PWD"

Actual second clean-run output:

advertised=7 received=7
plain_text: schema preserved
bounded_text: schema preserved
matched_text: schema preserved
bounded_number: schema preserved
exclusive_number: schema preserved
bounded_list: schema preserved
nested_text: schema preserved
PASS: real ACP MCP subprocess lists every constrained tool without schema loss

The first attempt in the second checkout identified a missing generated process-utils worker module. Running the normal Turbo build prerequisite resolved this setup failure without source changes. The copy-paste instructions include that prerequisite. No correction to the catalog observation was needed.

8. Related issues

9. Appendix: checks and constraints