WebMCP helper fails with “invalid input object” in Chrome 155
I maintainer di solito rispondono entro 1 giorno
Valutazione
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Idoneità per principianti
- 70/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Attiva
- Stack tecnologico
- typescript
- Ambito
- frontend
Direzione di ricerca
Il bug è in executeNativeTool in dist/client/webmcp.js righe 410-419 (sorgente: src/client/webmcp.ts) che passa JSON.stringify(input) a context.executeTool per gli adapter non Codex. Leggi quella funzione e la nota di deprecazione Chrome 155, poi modificala per passare l'oggetto grezzo su Chrome moderno. Done significa che la chiamata all'helper con {} ha successo come il executeTool nativo. Nessun test referenziato.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Summary
We use WebMCP to expose backend Actions as tools for browser agents. The browser WebMCP convenience helper fails when we call a registered read-only Action with {} in native Chrome.
The same Action succeeds through native executeTool with its original same-frame descriptor and object input.
Environment
- Reproduced on:
@agent-native/core,@agent-native/toolkit, and@agent-native/agentkit0.222.0. - Release check: npm
latestfor all three packages on 2026-10-29. - Browser: Chromium
155.0.8059.79on macOS, with nativedocument.modelContext. - Development runtime: Node
22.23.2, Vite8.1.0, React Router8.1.0, and React19.2.7. - Integration: The standard Agent Native React Router integration, full Toolkit
AppProviders, and PGlite0.5.9. - Authentication: A genuine session through the shared signup/password-login flow.
The reproduction used separately installed packages in an isolated application. It exercised real framework registration and the backend Action dispatcher. Neither Codex adapter method was present.
Steps and observed behavior
Fixture setup
-
Start the application with the packages and integration listed above.
-
Register a read-only Action named
read-fixture-statusthat accepts an empty object. -
Return this synthetic payload from the Action:
{"fixture":"synthetic-only","status":"available"} -
Create a disposable account through the shared signup form.
-
Open the authenticated application in native Chrome.
-
Wait for Toolkit's WebMCP registration to finish.
The helper reported state: "ready", with 121 registered tools. The fixture Action was among them.
Helper and native comparison
We ran both calls in the same top-level document. The tool was read-only, and the helper completed before the native comparison.
const helper = await window.__agentNativeWebMcp.call(
"read-fixture-status", {}, { waitMs: 2000 },
);
const tools = await document.modelContext.getTools();
const tool = tools.find(tool =>
tool.name === "read-fixture-status" && tool.window === window
);
const rawResult = await document.modelContext.executeTool(tool, {});
The helper resolved with state: "done", ok: false, attempts: 1, and code: "execution-failed". Its error was:
Failed to execute 'executeTool' on 'ModelContext': invalid input object: value is not an object
The native call succeeded and returned the expected JSON text:
{"fixture":"synthetic-only","status":"available"}
The native call reached POST /_agent-native/webmcp/actions/read-fixture-status and received HTTP 200. The helper rejection produced no additional Action POST.
Both calls used the same document, with timeOrigin: 1793269110254.8. The native comparison used the unmodified descriptor from getTools(), including its original window property.
Expected behavior
The convenience helper accepts the Action's object arguments and completes the call successfully, as the native invocation does.
Impact
The Action is discoverable, but the convenience-helper invocation cannot reach its backend handler. Callers receive an input-object error despite supplying an object.
This reproduction covers a read-only Action in the stated browser version. It does not exercise sidebar chat or mutating Actions.
Relevant code observations
Source version checked: @agent-native/core 0.222.0.
In the published dist/client/webmcp.js, executeNativeTool validates object input at lines 410–419. It then passes JSON.stringify(input) to context.executeTool unless it detects a Codex adapter.
The Chrome Imperative API documentation documents object input for executeTool. It marks JSON-stringified input deprecated from Chrome 155.
These static source observations align with the executed helper failure and successful native object call.
Author: OpenCode
- Lingua principale
- TypeScript
- Stelle
- 7.7k
- Fork
- 706
- Merge medio
- 1g 11h
- PR unite (30g)
- 790
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di BuilderIO/agent-native
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
BuilderIO/agent-native#9217 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
BuilderIO/agent-native#9124 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
An `absolute` element near the end of a long page gives the toolkit main surface a second scrollbarForse già presa Una pull request collegata a questa issue è aperta o già unita. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 77/100
BuilderIO/agent-native#8846 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Skill deletion succeeds but leaves Settings unclickableForse già presa Una pull request collegata a questa issue è aperta o già unita. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
BuilderIO/agent-native#8109 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 83/100
BuilderIO/agent-native#7922 · 2 commenti ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di BuilderIO/agent-native
Issue simili
-
Difficoltà 1/5 1-3 ore Idoneità per principianti 83/100
gofish-graphics/gofish-graphics#1384 ·
I maintainer di solito rispondono entro 1 giorno
-
adapter bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 83/100
Olanetsoft/agent-lookout#353 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
vicharanashala/vibe#1542 ·
I maintainer di solito rispondono entro 1 giorno
-
bug chore P2 size:XS
Difficoltà 2/5 1-3 ore Idoneità per principianti 77/100
josephfung/curia#2666 ·
I maintainer di solito rispondono entro 1 giorno
-
bug good first issue
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
devarshishimpi/codra#178 ·
I maintainer di solito rispondono entro 1 giorno