Files
windmill/backend/windmill-api/src
hugocasa 1c46f899ca fix(mcp): stop double-escaping string query params in build_query_string (#9855)
MCP tool arguments were converted to URL query values via `value.to_string()`
+ `trim_matches('"')`. For string values containing JSON (e.g. the `args`/`result`
filters on job listing, `args` on schedule listing), `to_string()` JSON-encodes the
string and escapes inner quotes with backslashes; stripping the outer quotes leaves
`{\"k\":\"v\"}`, which the backend's `serde_json::from_str` then fails to parse,
falling back to `FALSE` and returning zero results.

Use `value.as_str()` to emit the raw string content for `Value::String`, falling
back to `value.to_string()` for non-string types (numbers, booleans). Adds
regression tests covering JSON-string, non-string, and plain-string params.

Fixes WIN-2114

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-01 10:42:42 +02:00
..
2025-06-02 22:12:33 +02:00
2025-06-02 22:12:33 +02:00
2025-06-02 22:12:33 +02:00
2025-09-04 22:05:22 +00:00
2025-06-02 22:12:33 +02:00
2025-06-02 22:12:33 +02:00
2025-06-02 22:12:33 +02:00