browser_lighthouse_audit
Run a Google Lighthouse audit to obtain Performance, Accessibility, Best Practices, and SEO scores with diagnostic advice for web page quality assessment.
Instructions
Run a Google Lighthouse audit on the current page, returning Performance, Accessibility, Best Practices, and SEO scores plus key diagnostic advice. Each audit spins up an isolated headless Chrome instance (no interference with the active session) and shuts down afterwards.
中文详情:
用途:对当前页面执行 Google Lighthouse 审计,返回性能、可访问性、最佳实践、SEO 评分及关键诊断建议,每次审计启动独立 Headless Chrome 实例并自动关闭
何时使用:上线前综合质量评估时;性能/可访问性/SEO 多维度评分时;Lighthouse 评分回归监控时;Core Web Vitals 与 SEO 优化建议获取时
输出:{ ok: boolean, url: string, scores: { performance, accessibility, bestPractices, seo }, metrics: object, diagnostics: array, reportPath: string } — metrics 含 lcp/fid/cls/tbt/si
参数:
url (string, 可选):要审计的 URL,默认为当前浏览器页面的 URL
categories (array, 可选):要审计的类别,可选 performance/accessibility/best_practices/seo,默认全部
formFactor (string, 可选):模拟设备类型,可选 mobile/desktop,默认 desktop
throttling (boolean, 可选):是否模拟网络节流(3G 模拟),仅 mobile 模式下推荐启用,默认 false
错误:URL 不可达抛出 'Audit failed';Lighthouse 启动失败抛出 'Lighthouse launch failed'
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | No | 要审计的 URL。默认为当前浏览器页面的 URL | |
| categories | No | 要审计的类别,默认全部 | |
| formFactor | No | 模拟设备类型 | desktop |
| throttling | No | 是否模拟网络节流(3G 模拟),仅 mobile 模式下推荐启用 |