Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 6 additions & 8 deletions index.bs
Original file line number Diff line number Diff line change
Expand Up @@ -263,8 +263,8 @@ The <dfn method for=ModelContext>registerTool(<var>tool</var>)</dfn> method step
class=allow-2119>should</span> reconcile this difference.</p>
</div>

1. Let |read-only hint| be true if |tool|'s {{ModelContextTool/annotations}} [=map/exists=], and if
its {{ToolAnnotations/readOnlyHint}} [=map/exists=] and is true. Otherwise, let it be false.
1. Let |read-only hint| be true if |tool|'s {{ModelContextTool/annotations}} [=map/exists=] and
its {{ToolAnnotations/readOnlyHint}} is true. Otherwise, let it be false.

1. Let |tool definition| be a new [=tool definition=], with the following [=struct/items=]:

Expand Down Expand Up @@ -328,7 +328,7 @@ dictionary ModelContextTool {
};

dictionary ToolAnnotations {
boolean readOnlyHint;
boolean readOnlyHint = false;
};

callback ToolExecuteCallback = Promise<any> (object input, ModelContextClient client);
Expand Down Expand Up @@ -365,11 +365,9 @@ callback ToolExecuteCallback = Promise<any> (object input, ModelContextClient cl

The {{ToolAnnotations}} dictionary provides optional metadata about a tool:

<dl class="domintro">
<dt><code><var ignore>annotations</var>["{{ToolAnnotations/readOnlyHint}}"]</code></dt>
<dd>
<p>If true, indicates that the tool does not modify any state and only reads data. This hint can help [=agents=] make decisions about when it is safe to call the tool.
</dd>
<dl class="domintro" dfn-type=dict-member dfn-for=ToolAnnotations>
: <dfn>readOnlyHint</dfn>
:: If true, indicates that the tool does not modify any state and only reads data. This hint can help [=agents=] make decisions about when it is safe to call the tool.
</dl>

<h4 id="model-context-client">ModelContextClient Interface</h4>
Expand Down