lgtm, thanks!
I think you also have to update https://source.chromium.org/chromium/chromium/src/+/main:third_party/blink/web_tests/webexposed/global-interface-listing-expected.txt;l=374;drc=e9442c3f9a41aebeaafccecb132709a05201fa50 (the one you updated is specific to android webview)
const mcp = window.mcp;
supernit: seems unneeded? i.e. `window.mcp.provideContext`?
type: "object",
Please fix this WARNING reported by Check Contents: Please remove the trailing whitespace.
To rerun the analyzer locally, run: `ali...
Please remove the trailing whitespace.
To rerun the analyzer locally, run: `alint -- -c CheckContents`
For more information, see go/alint.
const mcp = window.mcp;
Ah, this is existing, feel free to remove use of variable.
Please fix this WARNING reported by Check Contents: Please remove the trailing whitespace.
To rerun the analyzer locally, run: `ali...
Please remove the trailing whitespace.
To rerun the analyzer locally, run: `alint -- -c CheckContents`
For more information, see go/alint.
static ModelContextProvider* GetProviderIfExists(LocalDOMWindow&);
nit: since the name already has to be qualified with the class, how about `GetIfExists`?
name: "",
No need to resolve here but we should probably have some restrictions on the name string (i.e. I think right now a single space would be valid?) Also limits on length?
Unfortunately I don't see anything about this in the MCP spec other than it being unique.
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Code-Review | +1 |
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Given that we couldn't get a resolution on this today (see https://github.com/webmachinelearning/webmcp/issues/24), I'd prefer not landing the rename for now. There's a few demos built on this API, better if we have devs update it once?
I'm good with landing the new provideContext/clearContext APIs since we had a resolution on that: https://github.com/webmachinelearning/webmcp/issues/15. Could we have this patch do just that for now?
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Code-Review | +1 |
interface ModelContextProvider
Not sorted correctly. That is why the bot is failing
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
lgtm, thanks!
I think you also have to update https://source.chromium.org/chromium/chromium/src/+/main:third_party/blink/web_tests/webexposed/global-interface-listing-expected.txt;l=374;drc=e9442c3f9a41aebeaafccecb132709a05201fa50 (the one you updated is specific to android webview)
Oops - missed that you updated both but Dave points out it's a sort error.
Given that we couldn't get a resolution on this today (see https://github.com/webmachinelearning/webmcp/issues/24), I'd prefer not landing the rename for now. There's a few demos built on this API, better if we have devs update it once?
I'm good with landing the new provideContext/clearContext APIs since we had a resolution on that: https://github.com/webmachinelearning/webmcp/issues/15. Could we have this patch do just that for now?
Given there's only a hand full of demos now and assuming we have some confidence `mcp` can stick for at least the near term (~months), now is probably the easiest it'll ever be to rename.
Sorry I had to miss the meeting today - do you have a sense of if we just want another week or two of discussion time or if this is something that'll take longer to resolve? If the former I'm fine to wait but if latter I think we should rename to a more amenable name sooner rather than later.
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
supernit: seems unneeded? i.e. `window.mcp.provideContext`?
Done
Please fix this WARNING reported by Check Contents: Please remove the trailing whitespace.
To rerun the analyzer locally, run: `ali...
Please remove the trailing whitespace.
To rerun the analyzer locally, run: `alint -- -c CheckContents`
For more information, see go/alint.
Fixed
Ah, this is existing, feel free to remove use of variable.
Done
Please fix this WARNING reported by Check Contents: Please remove the trailing whitespace.
To rerun the analyzer locally, run: `ali...
Please remove the trailing whitespace.
To rerun the analyzer locally, run: `alint -- -c CheckContents`
For more information, see go/alint.
Fixed
static ModelContextProvider* GetProviderIfExists(LocalDOMWindow&);
nit: since the name already has to be qualified with the class, how about `GetIfExists`?
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
David BokanGiven that we couldn't get a resolution on this today (see https://github.com/webmachinelearning/webmcp/issues/24), I'd prefer not landing the rename for now. There's a few demos built on this API, better if we have devs update it once?
I'm good with landing the new provideContext/clearContext APIs since we had a resolution on that: https://github.com/webmachinelearning/webmcp/issues/15. Could we have this patch do just that for now?
Given there's only a hand full of demos now and assuming we have some confidence `mcp` can stick for at least the near term (~months), now is probably the easiest it'll ever be to rename.
Sorry I had to miss the meeting today - do you have a sense of if we just want another week or two of discussion time or if this is something that'll take longer to resolve? If the former I'm fine to wait but if latter I think we should rename to a more amenable name sooner rather than later.
Leaving the object rename out of this CL and will hopefully follow up shortly with another once we have a resolution on that.
interface ModelContextProvider
Brandon Waldermansorting
Done
Not sorted correctly. That is why the bot is failing
Done
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
[CallWith=ScriptState, RaisesException] undefined registerTool(ToolRegistrationParams params);
If we are having end users experiment with both approaches should we have a MeasureAs for these?
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
[CallWith=ScriptState, RaisesException] undefined registerTool(ToolRegistrationParams params);
If we are having end users experiment with both approaches should we have a MeasureAs for these?
We should be able to just add the Measure (not MeasureAs) to these extended attributes and update the use counters appropriately.
Code-Review | +1 |
tool_map_ = std::move(prev_tool_map);
Not sure if it's better to keep the existing state when there's an error or discard it anyway. Can discuss on an issue.
[CallWith=ScriptState, RaisesException] undefined registerTool(ToolRegistrationParams params);
Dave TapuskaIf we are having end users experiment with both approaches should we have a MeasureAs for these?
We should be able to just add the Measure (not MeasureAs) to these extended attributes and update the use counters appropriately.
We're far off from end user experiments. :) For now, we just wanted to add both for devs trying the API. And learn from feedback about which one (or both) are needed.
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
[CallWith=ScriptState, RaisesException] undefined registerTool(ToolRegistrationParams params);
Dave TapuskaIf we are having end users experiment with both approaches should we have a MeasureAs for these?
Khushal SagarWe should be able to just add the Measure (not MeasureAs) to these extended attributes and update the use counters appropriately.
We're far off from end user experiments. :) For now, we just wanted to add both for devs trying the API. And learn from feedback about which one (or both) are needed.
Acknowledged
# Copyright 2025 The Chromium Authors
Brandon WaldermanRemove?
Done
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Code-Review | +1 |
# found in the LICENSE file.
don't gni files need a copyright header? (year needs to be updated though)
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
# found in the LICENSE file.
don't gni files need a copyright header? (year needs to be updated though)
Ugh.. I think the comment I made saying "Remove" was mis-interpretted. I was indicating remove this file from the patch set because it has no material changes. But the author seems to have taken that as "Remove the files on which the comment was made".
Yes please instead remove this file from the patch set.
# found in the LICENSE file.
Dave Tapuskadon't gni files need a copyright header? (year needs to be updated though)
Ugh.. I think the comment I made saying "Remove" was mis-interpretted. I was indicating remove this file from the patch set because it has no material changes. But the author seems to have taken that as "Remove the files on which the comment was made".
Yes please instead remove this file from the patch set.
We should add a copyright notice on this file though...I don't mind doing it here but it can also be a separate CL
# found in the LICENSE file.
Dave Tapuskadon't gni files need a copyright header? (year needs to be updated though)
David BokanUgh.. I think the comment I made saying "Remove" was mis-interpretted. I was indicating remove this file from the patch set because it has no material changes. But the author seems to have taken that as "Remove the files on which the comment was made".
Yes please instead remove this file from the patch set.
We should add a copyright notice on this file though...I don't mind doing it here but it can also be a separate CL
err, sorry, I mean we should update the year from 2020 to 2025 (which I think is what Brandon was doing in the original PS).
# found in the LICENSE file.
Dave Tapuskadon't gni files need a copyright header? (year needs to be updated though)
David BokanUgh.. I think the comment I made saying "Remove" was mis-interpretted. I was indicating remove this file from the patch set because it has no material changes. But the author seems to have taken that as "Remove the files on which the comment was made".
Yes please instead remove this file from the patch set.
David BokanWe should add a copyright notice on this file though...I don't mind doing it here but it can also be a separate CL
err, sorry, I mean we should update the year from 2020 to 2025 (which I think is what Brandon was doing in the original PS).
Yes, but then the rename didn't happen. And then this file was just left updating the copyright and no other changes, so I asked for it to be removed from the patch set.
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
# found in the LICENSE file.
Dave Tapuskadon't gni files need a copyright header? (year needs to be updated though)
David BokanUgh.. I think the comment I made saying "Remove" was mis-interpretted. I was indicating remove this file from the patch set because it has no material changes. But the author seems to have taken that as "Remove the files on which the comment was made".
Yes please instead remove this file from the patch set.
David BokanWe should add a copyright notice on this file though...I don't mind doing it here but it can also be a separate CL
Dave Tapuskaerr, sorry, I mean we should update the year from 2020 to 2025 (which I think is what Brandon was doing in the original PS).
Yes, but then the rename didn't happen. And then this file was just left updating the copyright and no other changes, so I asked for it to be removed from the patch set.
Removing from this patch set. We'll have a chance to update it again when we've settled on a name change.
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Code-Review | +1 |
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Code-Review | +1 |
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Add WebMCP methods to Script Tools API
This change adds the provideContext and clearContext methods alongside
the registerTool and unregisterTool methods to give web developers the
opportunity to experiment with both approaches.
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |