Skip to content
Open
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
16 changes: 10 additions & 6 deletions index.bs
Original file line number Diff line number Diff line change
Expand Up @@ -562,8 +562,12 @@ The <dfn method for=ModelContext>getTools(<var>options</var>)</dfn> method steps
:: |tool definition|'s [=tool definition/description=]

: {{RegisteredTool/inputSchema}}
:: |tool definition|'s [=tool definition/input schema=] if it is not the empty string;
otherwise undefined.
:: the result of [=parse a JSON string to a JavaScript value=] given |tool
definition|'s [=tool definition/input schema=], if |tool definition|'s [=tool
definition/input schema=] is not the empty string; otherwise undefined.
Comment thread
beaufortfrancois marked this conversation as resolved.

Note: This will never throw an exception, because the string stored in the tool
definition is always a valid JSON string.

: {{RegisteredTool/window}}
:: |targetDocument|'s [=relevant global object=]
Expand Down Expand Up @@ -713,7 +717,7 @@ dictionary RegisteredTool {
// done, and there's no need to do it again on tool exposure.
DOMString title;
required DOMString description;
DOMString inputSchema;
object inputSchema;
required Window window;
required USVString origin;
ToolAnnotations annotations;
Expand All @@ -734,9 +738,9 @@ dictionary RegisteredTool {
tool registration, via {{ModelContextTool/description}}.

: <code><var ignore>tool</var>["{{RegisteredTool/inputSchema}}"]</code>
:: A stringified JSON Schema object describing the expected input parameters for the tool
[[!JSON-SCHEMA]]. It is the string derived from {{ModelContextTool/inputSchema}} during
registration.
:: A JSON Schema object describing the expected input parameters for the tool
[[!JSON-SCHEMA]]. It is a deep copy of the schema provided at tool registration, via
{{ModelContextTool/inputSchema}}.
Comment thread
beaufortfrancois marked this conversation as resolved.

: <code><var ignore>tool</var>["{{RegisteredTool/window}}"]</code>
:: The {{Window}} of the document that registered the tool.
Expand Down
Loading