Skip to main content
Glama

browser_performance_check

Collect page performance metrics, evaluate against budgets, and identify violations like slow requests and long tasks.

Instructions

Collect current page performance metrics (navigation, paint, resource, long task, CLS/LCP) and evaluate against budgets. Enhanced with Core Web Vitals deep analysis (LCP/FCP/TTFB/CLS scoring).

中文详情:

  • 用途:采集当前页面 navigation/paint/resource/long task/CLS/LCP 等性能指标,按 budgets 输出性能预算结果,并集成 Core Web Vitals 深度分析

  • 何时使用:上线前性能基线评估时;Core Web Vitals 达标验证时;慢请求/长任务定位时;性能预算(budgets)门禁检查时

  • 输出:{ ok: boolean, metrics: object, budgets: object, passed: boolean, violations: array, coreWebVitals: { lcp, fcp, cls, ttfb, score } } — metrics 含 domContentLoaded/load/fcp/lcp/cls/longTaskCount/resourceCount

  • 参数:

    • budgets (object, 可选):预算阈值,支持 domContentLoaded/load/fcp/lcp/cls/longTaskCount/resourceCount/slowRequestMs

    • slowRequestMs (number, 可选):慢请求阈值毫秒,默认 1000;可覆盖 budgets.slowRequestMs

    • sessionName (string, 可选):浏览器会话名称,默认当前活跃会话

  • 错误:浏览器未启动抛出 'Browser not launched';budgets 字段类型错误抛出 'Invalid budget'

  • 示例:{"budgets":{"lcp":2500,"cls":0.1,"longTaskCount":5},"slowRequestMs":800}

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
budgetsNo预算阈值,支持 domContentLoaded、load、fcp、lcp、cls、longTaskCount、resourceCount、slowRequestMs
sessionNameNo浏览器会话名称,默认当前活跃会话
slowRequestMsNo慢请求阈值毫秒,默认 1000;可覆盖 budgets.slowRequestMs
Behavior4/5

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

No annotations exist, so the description carries full burden. It details the output structure, error conditions (browser not launched, invalid budget), and the scope (current page). It does not mention side effects, but performance collection is generally safe.

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

Conciseness3/5

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

The description is verbose due to bilingual content, with some redundancy (Chinese repeats English info). However, it is well-structured with an opening summary, then detailed Chinese bullets. Could be more concise.

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 the tool's complexity (3 params, nested objects, no output schema), the description covers purpose, usage, output format, parameter details, errors, and an example. This is complete enough for agent invocation.

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

Parameters4/5

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

Schema coverage is 100%, and the description adds value by providing defaults for slowRequestMs and sessionName, a detailed breakdown of budgets fields, and an example. This enriches 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 it collects page performance metrics and evaluates against budgets, listing specific metric types (navigation, paint, resource, long task, CLS/LCP) and Core Web Vitals. This distinguishes it from sibling tools like browser_performance_trace or browser_lighthouse_audit.

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 Chinese section explicitly lists use cases: pre-launch baseline, CWV compliance, slow request/long task localization, budget gate checks. While it doesn't state when not to use, the context is clear and no alternatives are mentioned.

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