diff --git a/index.bs b/index.bs index 241bb2c..81cb0ad 100644 --- a/index.bs +++ b/index.bs @@ -1343,7 +1343,21 @@ The [=browser agent=], on the other hand, does not run JavaScript on the page. I view of the page's tools and any other relevant context by getting an [=observation=]. An observation is an [=implementation-defined=] data structure containing at least a tool map, which is a [=map=] whose [=map/keys=] are [=Document/unique ID=]s, -and whose [=map/values=] are [=lists=] of [=tool definition=] [=structs=]. +and whose [=map/values=] are [=observed tool collection=] [=structs=]. + +An observed tool collection is a [=struct=] with the following [=struct/items=]: + +
ModelContext=]'s [=ModelContext/internal context=]'s
- [=model context/tool map=]'s [=map/values=], which are [=tool definitions=].
+ 1. Let |tools| be |document|'s [=Document/associated ModelContext|associated
+ ModelContext=]'s [=ModelContext/internal context=]'s [=model context/tool
+ map=]'s [=map/values=], which are [=tool definitions=].
+
+ 1. Let |observedToolCollection| be a new [=observed tool collection=] with the following [=struct/items=]:
+
+ : [=observed tool collection/origin=]
+ :: |document|'s [=Document/origin=]
+
+ : [=observed tool collection/tools=]
+ :: |tools|
+
+ 1. Set |observation|'s [=observation/tool map=][|id|] to |observedToolCollection|.
1. Perform any [=implementation-defined=] steps to add anything to |observation| that the [=user
agent=] might deem useful or necessary, besides just populating the [=observation/tool map=].
@@ -1389,11 +1413,6 @@ steps:
expose tools via Model Context Protocol, other proprietary "function calling" methods, or any
other way it deems appropriate.
- Advisement: Implementations are expected to convey to the [=browser agent=] any relevant
- security information associated with [=tool definitions=], such as the originating [=origin=],
- among other things, so that the backing model has an idea of the different parties at play, and
- can most safely carry out the end user's intent.
-
Each {{Document}} object has a unique ID, which is a [=unique internal