{"url_pattern":"^https?://duckduckgo\\.com(/.*)?$","site_name":"duckduckgo","allowed_domains":["duckduckgo.com","html.duckduckgo.com"],"tools":[{"name":"duckduckgo_search","description":"DuckDuckGo search (HTML lite, no JS needed)","inputSchema":{"type":"object","properties":{"query":{"type":"string","description":"Search query"}},"required":["query"]},"handler":"(params) => {\n  const run = async function(args) {\n\n      if (!args.query) return {error: 'Missing argument: query', hint: 'Provide a search query string'};\n\n      const url = 'https://html.duckduckgo.com/html/?q=' + encodeURIComponent(args.query);\n      const resp = await fetch(url);\n      if (!resp.ok) return {error: 'HTTP ' + resp.status};\n\n      const html = await resp.text();\n      const parser = new DOMParser();\n      const doc = parser.parseFromString(html, 'text/html');\n\n      const items = doc.querySelectorAll('.result');\n      const results = [];\n      items.forEach(el => {\n        const anchor = el.querySelector('.result__a');\n        if (!anchor) return;\n        const title = anchor.textContent.trim();\n        let href = anchor.getAttribute('href') || '';\n        // DuckDuckGo lite wraps URLs in a redirect; extract the actual URL if present\n        const udMatch = href.match(/[?&]uddg=([^&]+)/);\n        if (udMatch) href = decodeURIComponent(udMatch[1]);\n        const snippetEl = el.querySelector('.result__snippet');\n        const snippet = snippetEl ? snippetEl.textContent.trim() : '';\n        results.push({title, url: href, snippet});\n      });\n\n      return {query: args.query, count: results.length, results};\n  };\n  return run(params || {});\n}"}]}