Skip to main content
Glama

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'

  • 示例:{"url":"https://example.com","categories":["performance","accessibility"],"formFactor":"mobile","throttling":true}

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlNo要审计的 URL。默认为当前浏览器页面的 URL
categoriesNo要审计的类别,默认全部
formFactorNo模拟设备类型desktop
throttlingNo是否模拟网络节流(3G 模拟),仅 mobile 模式下推荐启用
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations provided, but the description fully compensates: it discloses isolated headless Chrome instance, no session interference, shutdown after audit, error messages (Audit failed, Lighthouse launch failed), and parameter behavior like throttling only recommended for mobile. This is comprehensive for behavioral transparency.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is well-structured: English summary first, then Chinese details breaking into purpose, when-to-use, output format, parameters, errors, and example. Every sentence adds value, no redundancy, front-loaded with key info.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given 4 parameters, no output schema, and no annotations, the description covers all necessary aspects: function, usage, output structure (scores, metrics, diagnostics, reportPath), parameter details, error handling, and example. Nothing missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, but description adds meaning beyond schema: it clarifies throttling only useful for mobile, provides example JSON, explains categories as array of specific enum values, and defaults. This enhances understanding beyond the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states that the tool runs a Google Lighthouse audit, returning specific scores and diagnostic advice. It uses a specific verb 'Run' and identifies the resource 'Lighthouse audit', distinguishing it from other browser tools that may focus on other aspects.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description includes explicit when-to-use scenarios (pre-release quality evaluation, multi-dimension scoring, regression monitoring) in both English and Chinese. It does not explicitly state when not to use or compare with sibling tools like browser_a11y_check, but the context implies it is for comprehensive audit.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/validpilot/ai-verify-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server