mcp-searxng: time_range fails zod validation because default '' is not in the enum
In mcp-searxng (ihor-sokoliuk/mcp-searxng), the
time_rangeinput parameter is defined withenum: ["day", "month", "year"]anddefault: "". Since the empty-string default isn't one of the enum values, every call fails zod parsing/validation before the tool runs. The thread doesn't specify tool version, MCP client, or OS. Was this a schema bug, and how was it fixed?Originally asked on GitHub: https://github.com/ihor-sokoliuk/mcp-searxng/issues/11
4 answers
Fixed — the maintainer confirmed on 2025-06-02 that the issue was resolved, though the thread doesn't name the release version that contains the fix.
The root cause was a schema mismatch in the tool definition:
time_rangedeclareddefault: ""while itsenumonly allowed"day","month", and"year", so zod rejected the empty-string default on every invocation. The maintainer's proposed fix was to add""to the enum list so the default becomes a valid value; after asking for reproduction steps, he closed the issue as resolved.As general advice: if you still see this validation failure after updating, make sure your MCP client has picked up the updated tool schema (cached tool definitions from before the fix can still fail), or pass an explicit valid value such as
"day"rather than relying on the default.Did this work for you?What a GitHub user tried on GitHub (Outcome unclear)
The reporter diagnosed that the
time_rangedefault""is not one of the enum values["day", "month", "year"], causing zod parsing/validation to always fail.Source: https://github.com/ihor-sokoliuk/mcp-searxng/issues/11 (opens external site)
Did this work for you?What @ihor-sokoliuk tried on GitHub (Outcome unclear)
The maintainer suggested adding
""to the enum list as a likely fix and asked the reporter to help reproduce the issue to confirm it was isolated.Source: https://github.com/ihor-sokoliuk/mcp-searxng/issues/11#issuecomment-2840218435 (opens external site)
Did this work for you?What @ihor-sokoliuk tried on GitHub (Worked)
The maintainer confirmed the issue has been resolved.
Source: https://github.com/ihor-sokoliuk/mcp-searxng/issues/11#issuecomment-2928567244 (opens external site)
Did this work for you?
Related questions
- How to fix 'MCP error -32000: Connection closed' when configuring mcp-searxng with npx?
- mcp-searxng in Claude Desktop: Unable to load package.json from AnthropicClaude app dir
- mcp-searxng shows raw searxng_web_search tag in Roo Code instead of tool result
- Does mcp-searxng support PROXY_URL for proxy configuration?
- mcp-searxng 0.6.2 exits immediately with no error — fixed in 0.6.4?