From 4d3a9fd3df72171cd5dd4ef70d1984b9b017da49 Mon Sep 17 00:00:00 2001 From: Diego Rodrigues de Sa e Souza <8016841+diegosouzapw@users.noreply.github.com> Date: Sun, 21 Jun 2026 15:43:55 -0300 Subject: [PATCH] fix(mcp): webFetchInput emits 'URL is required' for a missing url (#4510) (#4541) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The omniroute_web_fetch input schema (#4510) used z.string().min(1, "URL is required") for the url field, but .min() only fires for an empty string. A MISSING url (webFetchInput.parse({})) fails the z.string() type check first and emitted the default Zod v4 message ("expected string, received undefined"), so the existing test 'webFetchInput rejects missing URL' (expecting /URL is required/) failed on the full unit suite — a latent base red on release/v3.8.33. Add the custom message to the type check: z.string({ error: "URL is required" }). Now both the missing-field and empty-string cases emit 'URL is required'; a valid url still passes. No other web_fetch behavior changes. Co-authored-by: Diego Rodrigues de Sa e Souza Co-authored-by: Claude Opus 4.8 (1M context) --- open-sse/mcp-server/schemas/tools.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/open-sse/mcp-server/schemas/tools.ts b/open-sse/mcp-server/schemas/tools.ts index 067c44e75d..549f68423e 100644 --- a/open-sse/mcp-server/schemas/tools.ts +++ b/open-sse/mcp-server/schemas/tools.ts @@ -462,7 +462,7 @@ export const webSearchTool: McpToolDefinition