diff --git a/index.bs b/index.bs
index 47f85a7..d37954e 100644
--- a/index.bs
+++ b/index.bs
@@ -106,10 +106,34 @@ spec: ECMASCRIPT; urlPrefix: https://tc39.es/ecma262/
type: dfn
text: is an object; url: sec-object-type
+
+{
+ "mcp": {
+ "href": "https://modelcontextprotocol.io/specification/latest",
+ "title": "Model Context Protocol (MCP) Specification",
+ "publisher": "The Linux Foundation"
+ },
+ "json-schema": {
+ "href": "https://json-schema.org/draft/2020-12/json-schema-core.html",
+ "title": "JSON Schema: A Media Type for Describing JSON Documents",
+ "publisher": "JSON Schema"
+ },
+ "spotlighting": {
+ "href": "https://arxiv.org/abs/2403.14720",
+ "title": "Defending Against Indirect Prompt Injection Attacks With Spotlighting",
+ "publisher": "arXiv"
+ },
+ "sockpuppetting": {
+ "href": "https://arxiv.org/abs/2601.13359",
+ "title": "Sockpuppetting: Jailbreaking LLMs by Combining Prefilling with Optimization",
+ "publisher": "arXiv"
+ }
+}
+
Introduction
-WebMCP API is a new JavaScript interface that allows web developers to expose their web application functionality as “tools” - JavaScript functions with natural language descriptions and structured schemas that can be invoked by [=agents=], [=browser's agents=], and [=assistive technologies=]. Web pages that use WebMCP can be thought of as Model Context Protocol [[MCP]] servers that implement tools in client-side script instead of on the backend. WebMCP enables collaborative workflows where users and agents work together within the same web interface, leveraging existing application logic while maintaining shared context and user control.
+WebMCP API is a new JavaScript interface that allows web developers to expose their web application functionality as “tools” - JavaScript functions with natural language descriptions and structured schemas that can be invoked by [=agents=], [=browser's agents=], and assistive technologies. Web pages that use WebMCP can be thought of as Model Context Protocol [[MCP]] servers that implement tools in client-side script instead of on the backend. WebMCP enables collaborative workflows where users and agents work together within the same web interface, leveraging existing application logic while maintaining shared context and user control.
Terminology
@@ -119,7 +143,7 @@ TODO: Define any reusable high-level terms here that are not specific to algorit
An agent is an autonomous assistant that can understand a user’s goals and take actions on the user’s behalf to achieve them. Today, these are typically implemented by large language model (LLM) based [=AI platforms=], interacting with users via text-based chat interfaces.
-A browser’s agent is an [=agent=] provided by or through the browser that could be built directly into the browser or hosted by it, for example, via an extension or plug-in.
+A browser agent is an [=agent=] provided by or through the browser that could be built directly into the browser or hosted by it, for example, via an extension or plug-in.
An AI platform is a provider of agentic assistants such as OpenAI’s ChatGPT, Anthropic’s Claude, or Google’s Gemini.
@@ -182,7 +206,7 @@ A tool definition is a [=struct=] with the following [=struct/items=]
:: an [=annotations=]-or-null.
: exposed origins
- :: a [=list=] or [=origins=], initially [=list/empty=].
+ :: a [=list=] of [=origins=], initially [=list/empty=].
A local pending tool execution is a [=struct=] with the following [=struct/items=]:
@@ -788,7 +812,7 @@ The registerTool(tool, options
@@ -1267,31 +1291,6 @@ dictionary RegisteredTool {
-
-{
- "mcp": {
- "href": "https://modelcontextprotocol.io/specification/latest",
- "title": "Model Context Protocol (MCP) Specification",
- "publisher": "The Linux Foundation"
- },
- "json-schema": {
- "href": "https://json-schema.org/draft/2020-12/json-schema-core.html",
- "title": "JSON Schema: A Media Type for Describing JSON Documents",
- "publisher": "JSON Schema"
- },
- "spotlighting": {
- "href": "https://arxiv.org/abs/2403.14720",
- "title": "Defending Against Indirect Prompt Injection Attacks With Spotlighting",
- "publisher": "arXiv"
- },
- "sockpuppetting": {
- "href": "https://arxiv.org/abs/2601.13359",
- "title": "Sockpuppetting: Jailbreaking LLMs by Combining Prefilling with Optimization",
- "publisher": "arXiv"
- }
-}
-
-
Events
The following are the [=event handlers=] (and their corresponding [=event handler event types=])
@@ -1466,7 +1465,7 @@ steps:
expose the |observation|'s [=observation/tool map=] to the [=browser agent=] in whatever way it
accepts.
- Note: Despite the name of this API (i., Web*MCP*), this specification does not prescribe the
+ Note: Despite the name of this API (i.e., Web*MCP*), this specification does not prescribe the
format in which tools are exposed to the [=browser agent=]. Browsers are free to distill and
expose tools via Model Context Protocol, other proprietary "function calling" methods, or any
other way it deems appropriate.
@@ -1875,7 +1874,7 @@ page, protecting against malicious scripts or dependencies from using WebMCP API
**What:** Shared evals for prompt injection attacks against WebMCP
-**Threats addressed:** [[#prompt-injection]] (potentially [[#privacy-leakage-over-parameterization]]
+**Threats addressed:** [[#prompt-injection]] (potentially [[#privacy-leakage-over-parameterization]])
**How:** Ensuring an interoperable basis for prompt injection defense, by requiring any implementer to protect against at least the attacks in that dataset. See [Issue #106](https://github.com/webmachinelearning/webmcp/issues/106).