Repository navigation
Commit 8a78db7
[WebMCP] Implement consequentialHint annotation
This change implements the consequentialHint annotation for WebMCP script tools (webmachinelearning/webmcp#176), matching the existing untrustedContentHint implementation.
When a tool is registered with consequentialHint: true, this hint is plumbed through Blink's script tool declarations, Mojom IPC annotations, the ScriptTool actor layer, and the Chrome DevTools Protocol (CDP) WebMCP domain. This allows the browser and DevTools to identify tools that perform consequential actions (e.g., booking flights, transferring money).
Bug: 520004016
Test: ModelContextTest.* unit tests
This change implements the consequentialHint annotation for WebMCP script tools, matching the existing untrustedContentHint implementation.
When a tool is registered with consequentialHint: true, this hint is plumbed through Blink's script tool declarations, Mojom IPC annotations, the ScriptTool actor layer, and the Chrome DevTools Protocol (CDP) WebMCP domain. This allows the browser and DevTools to identify tools that perform consequential actions (e.g., booking flights, transferring money).
Bug: 520004016
Test: ModelContextTest.* unit tests
This change implements the consequentialHint annotation for WebMCP script tools, see: webmachinelearning/webmcp#176.
Bug: 520004016
Test: ModelContextTest.* unit tests
Change-Id: I9afce4e86ef9f93f860b7ba80740cb08ed7c3f361 parent e235e08 commit 8a78db7
4 files changed
Lines changed: 10 additions & 2 deletions
File tree
- interfaces
- webmcp/imperative
- resources
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
| 31 | + | |
31 | 32 | | |
32 | 33 | | |
33 | 34 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
29 | | - | |
| 29 | + | |
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
| |||
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
45 | | - | |
| 45 | + | |
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| 16 | + | |
16 | 17 | | |
17 | 18 | | |
18 | 19 | | |
| |||
27 | 28 | | |
28 | 29 | | |
29 | 30 | | |
| 31 | + | |
30 | 32 | | |
31 | 33 | | |
32 | 34 | | |
| |||
52 | 54 | | |
53 | 55 | | |
54 | 56 | | |
| 57 | + | |
55 | 58 | | |
56 | 59 | | |
57 | 60 | | |
| |||
75 | 78 | | |
76 | 79 | | |
77 | 80 | | |
| 81 | + | |
78 | 82 | | |
79 | 83 | | |
80 | 84 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
35 | 38 | | |
36 | 39 | | |
37 | 40 | | |
0 commit comments