From 6bdcc6b5d55e354d3a976565eb44d3b1d503bf65 Mon Sep 17 00:00:00 2001 From: sjdallst2 <138722501+sjdallst2@users.noreply.github.com> Date: Wed, 25 Nov 2026 15:49:43 -0800 Subject: [PATCH] Reject whitespace-only tool descriptions Fixes #372. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- index.bs | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/index.bs b/index.bs index 95d6872..2a27761 100644 --- a/index.bs +++ b/index.bs @@ -797,8 +797,9 @@ is.
document.{{Document/modelContext}}.{{ModelContext/registerTool(tool, options)}}Registers a tool that [=agents=] can invoke. Returns a rejected promise if a tool with the - same name is already registered, if the given {{ModelContextTool/name}} or - {{ModelContextTool/description}} are empty strings, or if the {{ModelContextTool/inputSchema}} + same name is already registered, if the given {{ModelContextTool/name}} is the empty string, + if the {{ModelContextTool/description}} is empty or contains only [=ASCII whitespace=], + or if the {{ModelContextTool/inputSchema}} or {{ModelContextTool/outputSchema}} is invalid.