Add executeTool() - #2
Draft
MiguelsPizza wants to merge 1 commit into
Draft
MiguelsPizza wants to merge 1 commit into
MiguelsPizza wants to merge 1 commit into
Conversation
This was referenced Sep 14, 2026
MiguelsPizza
force-pushed
the
alex/core-polyfill
branch
2 times, most recently
from
September 14, 2026 15:30
bea387f to
1be0c1f
Compare
MiguelsPizza
force-pushed
the
alex/execute-tool
branch
2 times, most recently
from
September 14, 2026 15:50
49e0a43 to
a8d5c56
Compare
MiguelsPizza
force-pushed
the
alex/core-polyfill
branch
from
September 14, 2026 15:50
1be0c1f to
183109a
Compare
MiguelsPizza
force-pushed
the
alex/execute-tool
branch
2 times, most recently
from
September 14, 2026 21:48
ad06f90 to
f757b99
Compare
MiguelsPizza
force-pushed
the
alex/core-polyfill
branch
2 times, most recently
from
September 15, 2026 16:38
34da5b6 to
855027d
Compare
MiguelsPizza
force-pushed
the
alex/execute-tool
branch
from
September 15, 2026 16:38
f757b99 to
f2e95de
Compare
MiguelsPizza
force-pushed
the
alex/core-polyfill
branch
from
September 15, 2026 17:12
855027d to
843ec28
Compare
MiguelsPizza
force-pushed
the
alex/execute-tool
branch
from
September 15, 2026 17:12
f2e95de to
c9f718c
Compare
MiguelsPizza
force-pushed
the
alex/core-polyfill
branch
from
September 15, 2026 17:16
843ec28 to
74ccd8d
Compare
MiguelsPizza
force-pushed
the
alex/execute-tool
branch
from
September 15, 2026 17:16
c9f718c to
f361c09
Compare
Implement executeTool() against the current draft: object input, JSON-serialized results, and abort handling that gives the callback its own signal and a default AbortError while the caller receives its own reason. Extend the WPT selection from 13 files to 18, and from 27 assertions to 56, now that the interface is complete enough for the IDL harness. Record as per-subtest expected failures in wpt-metadata the four upstream files that disagree with the draft on omitted input and on result serialization, rather than patching tests or relaxing the implementation. Carry a temporary ModelContext augmentation mirroring webmcp-types#3 until that ships. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
MiguelsPizza
force-pushed
the
alex/execute-tool
branch
from
September 15, 2026 17:17
f361c09 to
0cb2b89
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
WIP - currently having some AI's do reviews. Below is AI generated
this adds
executeTool()on top of #1, following the draft algorithm: object input, JSON-serialized results, and cancellation that hands the callback its own fresh signal and a defaultAbortErrorwhile the caller gets its own reason back. The method is declared by a local augmentation that mirrors webmcp-types#3 exactly, includingModelContextExecuteToolOptions, so removing it once that ships is a straight deletion.The execution tests are their own file, so this PR is mostly one new file rather than hunks spliced through the registration tests.
100 browser tests and the package checks pass. WPT is at 51 passing assertions including all 22 IDL checks, with five expected failures recorded per assertion in
wpt-metadata. The pin is the WPT export of the Chromium CL for #246 and #251 and it rewrote all four of those files, so these aren't stale tests waiting on an update: the draft's input and result rules haven't moved since #251 merged. Four of the five callexecuteTool()with no input, which the draft rejects with aTypeErrorbefore it looks the tool up;object-argumentswants an unquoted"Success"back from a callback whose result the draft JSON-serializes. Unexpected passes fail the run too, so these can't quietly go green. Details in TESTING.md.One thing I'd like your read on: a
tool.windowfrom another document rejects withUnknownError, matching step 16.1, rather thanNotSupportedErroras I originally had it. Extension integration is #3.