From 9010643069da5ebc26bc73439ab0403471ef0290 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Fran=C3=A7ois=20Beaufort?= Throws a new {{TypeError}} when the backing "JSON.stringify()"
yields undefined, e.g.,
"inputSchema: { toJSON() {return HTMLDivElement;}}", or
- "innputSchema: { toJSON() {return undefined;}}".inputSchema: { toJSON() {return undefined;}}".
Re-throws exceptions thrown by "JSON.stringify()", e.g., when
"inputSchema" is an object with a circular reference, etc.
Currently, the only implementation of this spec (Chromium) does not throw - exceptions in the first case above. And for the second case, Chromium throws new {{TypeError}} - exceptions, as opposed to re-throwing the original exception. We should reconcile this difference.
1. Let |read-only hint| be true if |tool|'s {{ModelContextTool/annotations}} [=map/exists=], and if