fix(search): stabilize brave mcp skill args
This commit is contained in:
@@ -14,15 +14,15 @@ OPTS_JSON="$(printf '%s' "$OPTS_JSON_RAW" | jq -c '. // {}')"
|
|||||||
|
|
||||||
ARGS_JSON="$(jq -cn --arg q "$QUERY" --arg opts "$OPTS_JSON" '
|
ARGS_JSON="$(jq -cn --arg q "$QUERY" --arg opts "$OPTS_JSON" '
|
||||||
($opts | fromjson) as $o |
|
($opts | fromjson) as $o |
|
||||||
{
|
({
|
||||||
query: $q,
|
query: $q,
|
||||||
country: ($o.country // "US"),
|
country: ($o.country // "US"),
|
||||||
search_lang: ($o.search_lang // "en"),
|
search_lang: ($o.search_lang // "en"),
|
||||||
ui_lang: ($o.ui_lang // "en-US"),
|
ui_lang: ($o.ui_lang // "en-US"),
|
||||||
count: ($o.count // 5),
|
count: ($o.count // 5)
|
||||||
freshness: ($o.freshness // empty),
|
|
||||||
safesearch: ($o.safesearch // empty)
|
|
||||||
}
|
}
|
||||||
|
+ (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)"
|
RAW="$(mcporter call --allow-http "$URL.brave_web_search" --args "$ARGS_JSON" --output json)"
|
||||||
|
|||||||
Reference in New Issue
Block a user