Declarative API is not working

68 views
Skip to first unread message

Razvan Dimulescu

unread,
Feb 28, 2026, 9:53:44 AMFeb 28
to Chrome Built-in AI Early Preview Program Discussions
Hi,

I've been experimenting with WebMCP and ran into an issue with the Declarative API that I can't resolve. Forms annotated with toolname and tooldescription attributes are not discovered or listed by the Inspector extension. 
The Imperative API works correctly. Tools registered via window.navigator.modelContext.provideContext() and registerTool() are visible in the Inspector extension and can be invoked as expected.

I've tried with some custom code written by me but also with the code from the french-bistro demo.

Environment
- Chrome 146 (confirmed via chrome://version)
- Flag enabled: chrome://flags/#enable-webmcp-testing → Enabled, Chrome fully relaunched
- Model Context Tool Inspector extension installed
- Page served over HTTP via both http-server (Node) and Vite dev server 
 
Thank you in advanced :) 

Razvan Dimulescu

unread,
Mar 1, 2026, 6:26:43 AMMar 1
to Chrome Built-in AI Early Preview Program Discussions, Razvan Dimulescu
After investigating a few more, I discovered that using provideContext tool, it overrides also declarative tools.

François Beaufort

unread,
Mar 2, 2026, 4:14:09 AMMar 2
to Razvan Dimulescu, Chrome Built-in AI Early Preview Program Discussions
On Sun, Mar 1, 2026 at 12:26 PM Razvan Dimulescu <razvan.d...@gmail.com> wrote:
After investigating a few more, I discovered that using provideContext tool, it overrides also declarative tools.

Indeed!
Note that folks are currently discussing whether provideContextshould be removed in https://github.com/webmachinelearning/webmcp/issues/101 



Il giorno sabato 28 febbraio 2026 alle 15:53:44 UTC+1 Razvan Dimulescu ha scritto:
Hi,

I've been experimenting with WebMCP and ran into an issue with the Declarative API that I can't resolve. Forms annotated with toolname and tooldescription attributes are not discovered or listed by the Inspector extension. 
The Imperative API works correctly. Tools registered via window.navigator.modelContext.provideContext() and registerTool() are visible in the Inspector extension and can be invoked as expected.

I've tried with some custom code written by me but also with the code from the french-bistro demo.

Environment
- Chrome 146 (confirmed via chrome://version)
- Flag enabled: chrome://flags/#enable-webmcp-testing → Enabled, Chrome fully relaunched
- Model Context Tool Inspector extension installed
- Page served over HTTP via both http-server (Node) and Vite dev server 
 
Thank you in advanced :) 

--
You received this message because you are subscribed to the Google Groups "Chrome Built-in AI Early Preview Program Discussions" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chrome-ai-dev-previe...@chromium.org.
To view this discussion visit https://groups.google.com/a/chromium.org/d/msgid/chrome-ai-dev-preview-discuss/481c851d-ad3d-4a50-b599-66d84612eaf2n%40chromium.org.
Reply all
Reply to author
Forward
0 new messages