Skip to content

Commit 073712c

Browse files
Add consequentialHint to ToolAnnotations
1 parent 0b676d2 commit 073712c

1 file changed

Lines changed: 21 additions & 0 deletions

File tree

index.bs

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,9 @@ A <dfn>tool definition</dfn> is a [=struct=] with the following [=struct/items=]
177177
: <dfn>untrusted content hint</dfn>
178178
:: a [=boolean=], initially false.
179179

180+
: <dfn>consequential hint</dfn>
181+
:: a [=boolean=], initially false.
182+
180183
: <dfn>exposed origins</dfn>
181184
:: a [=list=] or [=origins=], initially [=list/empty=].
182185
</dl>
@@ -395,6 +398,9 @@ The <dfn method for=ModelContext>registerTool(<var>tool</var>, <var>options</var
395398
1. Let |untrusted content hint| be true if |tool|'s {{ModelContextTool/annotations}} [=map/exists=] and
396399
its {{ToolAnnotations/untrustedContentHint}} is true. Otherwise, let it be false.
397400

401+
1. Let |consequential hint| be true if |tool|'s {{ModelContextTool/annotations}} [=map/exists=] and
402+
its {{ToolAnnotations/consequentialHint}} is true. Otherwise, let it be false.
403+
398404
1. Let |promise| be [=a new promise=] created in [=this=]'s [=relevant realm=].
399405

400406
1. Let |signal| be |options|'s {{ModelContextRegisterToolOptions/signal}}.
@@ -447,6 +453,9 @@ The <dfn method for=ModelContext>registerTool(<var>tool</var>, <var>options</var
447453
: [=tool definition/untrusted content hint=]
448454
:: |untrusted content hint|
449455

456+
: [=tool definition/consequential hint=]
457+
:: |consequential hint|
458+
450459
: [=tool definition/exposed origins=]
451460
:: |exposed origins|
452461

@@ -482,6 +491,7 @@ dictionary ModelContextTool {
482491
dictionary ToolAnnotations {
483492
boolean readOnlyHint = false;
484493
boolean untrustedContentHint = false;
494+
boolean consequentialHint = false;
485495
};
486496

487497
callback ToolExecuteCallback = Promise<any> (object input);
@@ -531,6 +541,9 @@ The {{ToolAnnotations}} dictionary provides optional metadata about a tool:
531541

532542
: <code><var ignore>annotations</var>["{{ToolAnnotations/untrustedContentHint}}"]</code>
533543
:: If true, indicates that the tool's output contains data that is untrusted, from the perspective of the author registering the tool.
544+
545+
: <code><var ignore>annotations</var>["{{ToolAnnotations/consequentialHint}}"]</code>
546+
:: If true, indicates that executing the tool will result in consequential actions, ex: booking a flight, transferring money.
534547
</dl>
535548

536549

@@ -1101,6 +1114,14 @@ respective private browsing modes are safely exposed to [=agents=] and that thes
11011114

11021115
**How:** A boolean {{ToolAnnotations/untrustedContentHint}} annotation that acts as a signal to the client that the payload requires heightened security handling, allowing the client to sanitize the payload, use indicators such as spotlighting [[SPOTLIGHTING]] to highlight untrustworthy content to the model, or hide that part of the response entirely.
11031116

1117+
<h4 id="mitigation-consequential-annotation">Consequential Annotation for Tool Executions</h4>
1118+
1119+
**What:** Providing agents with a signal that a tool's execution results in significant, real-world, or non-reversible consequences.
1120+
1121+
**Threats addressed:** [[#misrepresentation-of-intent]]
1122+
1123+
**How:** A boolean {{ToolAnnotations/consequentialHint}} annotation acts as a signal to the client or agent that the tool performs a consequential action, such as booking a flight or transferring money. This way they can selectively enforce mandatory user confirmation prompts before executing high-stakes tools, directly mitigating the risk of accidental or malicious misrepresentation of intent.
1124+
11041125
<h2 id="accessibility">Accessibility considerations</h2>
11051126

11061127

0 commit comments

Comments
 (0)