@@ -775,8 +775,12 @@ The <dfn method for=ModelContext>getTools(<var>options</var>)</dfn> method steps
775775 :: |tool definition|'s [=tool definition/description=]
776776
777777 : {{RegisteredTool/inputSchema}}
778- :: |tool definition|'s [=tool definition/input schema=] if it is not the empty string;
779- otherwise undefined.
778+ :: the result of [=parse a JSON string to a JavaScript value=] given |tool
779+ definition|'s [=tool definition/input schema=], if |tool definition|' s [=tool
780+ definition/input schema=] is not the empty string; otherwise undefined.
781+
782+ Note: This will never throw an exception, because the string stored in the tool
783+ definition is always a valid JSON string.
780784
781785 : {{RegisteredTool/window}}
782786 :: |targetDocument|'s [=relevant global object=]
@@ -1121,7 +1125,7 @@ dictionary RegisteredTool {
11211125 // done, and there's no need to do it again on tool exposure.
11221126 DOMString title;
11231127 required DOMString description;
1124- DOMString inputSchema;
1128+ object inputSchema;
11251129 required Window window;
11261130 required USVString origin;
11271131 ToolAnnotations annotations;
@@ -1142,9 +1146,9 @@ dictionary RegisteredTool {
11421146 tool registration, via {{ModelContextTool/description}} .
11431147
11441148 : <code><var ignore> tool</var> ["{{RegisteredTool/inputSchema}}"] </code>
1145- :: A stringified JSON Schema object describing the expected input parameters for the tool
1146- [[!JSON-SCHEMA]] . It is the string derived from {{ModelContextTool/inputSchema}} during
1147- registration .
1149+ :: A JSON Schema object describing the expected input parameters for the tool
1150+ [[!JSON-SCHEMA]] . It is a deep copy of the schema provided at tool registration, via
1151+ {{ModelContextTool/inputSchema}} .
11481152
11491153 : <code><var ignore> tool</var> ["{{RegisteredTool/window}}"] </code>
11501154 :: The {{Window}} of the document that registered the tool.
0 commit comments