{"url_pattern":"^https?://store\\.steampowered\\.com(/.*)?$","site_name":"steam","allowed_domains":["example.com","store.steampowered.com"],"tools":[{"name":"steam_top_sellers","description":"Steam top selling games","inputSchema":{"type":"object","properties":{"limit":{"type":"number","description":"Number of games","default":10}},"required":null},"handler":"(params) => {\n  const args = Object.assign({\"limit\": 10}, params || {});\n  let data = null;\n  let __wbContextUrl = globalThis.location?.href || '';\n  let __wbContextDocument = globalThis.document || null;\n    const __wbDefault = (value, fallback) => (value === undefined || value === null || value === '' ? fallback : value);\n    const __wbJoin = (value, separator) => Array.isArray(value) ? value.join(separator) : (value ?? '');\n    const __wbGet = (value, path) => {\n      if (!path) return value;\n      return String(path).split('.').reduce((acc, part) => (acc == null ? undefined : acc[part]), value);\n    };\n    const __wbBaseUrl = () => (__wbContextUrl || globalThis.location?.href || 'https://example.com/');\n    const __wbResolve = (target, base) => {\n      if (target == null) return '';\n      const text = String(target);\n      try {\n        return /^https?:/i.test(text) ? text : new URL(text, base || __wbBaseUrl()).toString();\n      } catch (_error) {\n        return text;\n      }\n    };\n    const __wbFetch = async (target, options) => {\n      const url = __wbResolve(target, __wbBaseUrl());\n      const resp = await globalThis.fetch(url, Object.assign({ credentials: 'include' }, options || {}));\n      if (!resp.ok) {\n        throw new Error(`HTTP ${resp.status} for ${url}`);\n      }\n      const text = await resp.text();\n      try {\n        return { url, text, data: JSON.parse(text) };\n      } catch (_error) {\n        return { url, text, data: text };\n      }\n    };\n  return (async () => {\n    {\n      const __wbResp = await __wbFetch(\"https://store.steampowered.com/api/featuredcategories/\");\n      data = __wbResp.data;\n    }\n    data = __wbGet(data, \"top_sellers.items\");\n    {\n      const source = Array.isArray(data) ? data : (data == null ? [] : [data]);\n      data = source.map((item, index) => ({\n        \"rank\": index + 1,\n        \"name\": item.name,\n        \"price\": item.final_price,\n        \"discount\": item.discount_percent,\n        \"url\": `https://store.steampowered.com/app/${item.id}`,\n      }));\n    }\n    if (Array.isArray(data)) data = data.slice(0, Number(args.limit) || 0);\n    return data;\n  })();\n}"}]}