mirror of
https://github.com/0xMassi/webclaw.git
synced 2026-06-17 23:55:13 +02:00
Follow-up to #58/#59, which fixed numeric params but left the booleans. MCP clients (e.g. Claude Desktop) send `true` as the JSON string `"true"`, which serde's default bool deserializer rejects with `invalid type: string "true", expected a boolean`, failing the call. Adds a `deser_opt_bool_or_str` helper (same untagged pattern as the #59 numeric helpers) that accepts a JSON boolean OR "true"/"false" (case-insensitive, trimmed) and rejects anything else with a clear error. Numeric-looking strings like "1" are intentionally NOT coerced to bool. Applied to every Option<bool> tool param: - scrape -> only_main_content - crawl -> use_sitemap - research -> deep - search -> scrape (added by the standalone-search slice, #63) 16 unit tests (bool / "true"-string / absent->None / garbage->error per field). No new dependencies. Fixes #62. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| webclaw-cli | ||
| webclaw-core | ||
| webclaw-fetch | ||
| webclaw-llm | ||
| webclaw-mcp | ||
| webclaw-pdf | ||
| webclaw-server | ||