From 610f2e40b8c3d7c8ef717da4c3c5cb3c2634b692 Mon Sep 17 00:00:00 2001 From: zap Date: Tue, 10 Mar 2026 19:53:37 +0000 Subject: [PATCH] fix(search): stabilize brave mcp skill args --- skills/brave-mcp-search/scripts/search.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/skills/brave-mcp-search/scripts/search.sh b/skills/brave-mcp-search/scripts/search.sh index 6b83cb6..3239286 100755 --- a/skills/brave-mcp-search/scripts/search.sh +++ b/skills/brave-mcp-search/scripts/search.sh @@ -14,15 +14,15 @@ OPTS_JSON="$(printf '%s' "$OPTS_JSON_RAW" | jq -c '. // {}')" ARGS_JSON="$(jq -cn --arg q "$QUERY" --arg opts "$OPTS_JSON" ' ($opts | fromjson) as $o | - { + ({ query: $q, country: ($o.country // "US"), search_lang: ($o.search_lang // "en"), ui_lang: ($o.ui_lang // "en-US"), - count: ($o.count // 5), - freshness: ($o.freshness // empty), - safesearch: ($o.safesearch // empty) + count: ($o.count // 5) } + + (if ($o.freshness? // null) != null then {freshness: $o.freshness} else {} end) + + (if ($o.safesearch? // null) != null then {safesearch: $o.safesearch} else {} end)) ')" RAW="$(mcporter call --allow-http "$URL.brave_web_search" --args "$ARGS_JSON" --output json)"