Skip to main content
Glama

run_performance_audit

Analyze website performance using Lighthouse audits to identify optimization opportunities and improve loading speed.

Instructions

Run Lighthouse performance audit

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlYes
configNo

Implementation Reference

  • Core handler implementation that performs HTTP POST to Browserless '/performance' endpoint to execute the Lighthouse performance audit.
    async runPerformanceAudit(request: PerformanceRequest): Promise<BrowserlessResponse<PerformanceResponse>> {
      try {
        const response: AxiosResponse<PerformanceResponse> = await this.httpClient.post('/performance', request);
    
        return {
          success: true,
          data: response.data,
        };
      } catch (error) {
        return this.handleError(error);
      }
    }
  • MCP server-side tool handler for 'run_performance_audit' that delegates to BrowserlessClient and formats the MCP response.
    case 'run_performance_audit': {
      if (!args) throw new Error('Arguments are required');
      const result = await this.client!.runPerformanceAudit(args as any);
      if (result.success && result.data) {
        return {
          content: [
            {
              type: 'text',
              text: 'Performance audit completed successfully.',
            },
            {
              type: 'text',
              text: JSON.stringify(result.data, null, 2),
            },
          ],
        };
      } else {
        throw new Error(result.error || 'Failed to run performance audit');
      }
    }
  • Input schema definition for the 'run_performance_audit' tool, including required 'url' and optional 'config'.
    {
      name: 'run_performance_audit',
      description: 'Run Lighthouse performance audit',
      inputSchema: {
        type: 'object',
        properties: {
          url: { type: 'string' },
          config: {
            type: 'object',
            properties: {
              extends: { type: 'string' },
              settings: { type: 'object' },
            },
          },
        },
        required: ['url'],
      },
    },
  • Zod schema and TypeScript type definition for PerformanceRequest used in the client implementation.
    export const PerformanceRequestSchema = z.object({
      url: z.string(),
      config: z.object({
        extends: z.string().optional(),
        settings: z.record(z.any()).optional(),
      }).optional(),
    });
    
    export type PerformanceRequest = z.infer<typeof PerformanceRequestSchema>;
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. 'Run Lighthouse performance audit' implies a potentially resource-intensive operation that might have side effects (e.g., network requests, browser execution), but the description doesn't mention permissions, rate limits, execution time, or what the output looks like. This leaves significant gaps for a tool with no annotation coverage.

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 a single, efficient sentence with zero wasted words. It's appropriately sized for a simple tool name and gets straight to the point without unnecessary elaboration.

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

Completeness2/5

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

Given the complexity (2 parameters with nested objects, no annotations, no output schema), the description is incomplete. It doesn't explain what a Lighthouse audit entails, what metrics it returns, how long it takes, or any error conditions. For a performance testing tool, this leaves too many operational questions unanswered.

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

Parameters2/5

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

With 0% schema description coverage and 2 parameters (including a nested object), the description adds no information about what 'url' or 'config' mean, their expected formats, or how they affect the audit. The description fails to compensate for the complete lack of schema documentation, leaving parameters semantically undefined.

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

Purpose4/5

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

The description clearly states the action ('Run') and the resource ('Lighthouse performance audit'), providing a specific verb+resource combination. However, it doesn't differentiate this tool from potential siblings like 'execute_browserql' or 'take_screenshot' that might also involve browser-based operations, which prevents a perfect score.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives. With siblings like 'execute_browserql' and 'take_screenshot' that might overlap in browser functionality, there's no indication of when this audit tool is preferred or what prerequisites might be needed.

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/Lizzard-Solutions/browserless-mcp'

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