Skip to main content
Glama

get_metrics

Retrieve browser performance metrics and audit data for web pages using browser automation. Supports detailed analysis for optimization and debugging tasks.

Instructions

Get metrics

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • src/index.ts:267-274 (registration)
    Registration of the 'get_metrics' tool in the MCP server, including name, description, and empty input schema.
    { name: 'get_metrics', description: 'Get metrics', inputSchema: { type: 'object', properties: {}, }, },
  • MCP server handler for 'get_metrics' tool that delegates to client.getMetrics() and formats the response.
    case 'get_metrics': { const result = await this.client!.getMetrics(); if (result.success && result.data) { return { content: [ { type: 'text', text: 'Current metrics:', }, { type: 'text', text: JSON.stringify(result.data, null, 2), }, ], }; } else { throw new Error(result.error || 'Failed to get metrics'); } }
  • Core implementation of getMetrics in BrowserlessClient that performs HTTP GET to /metrics endpoint and handles response/error.
    async getMetrics(): Promise<BrowserlessResponse<any>> { try { const response: AxiosResponse<any> = await this.httpClient.get('/metrics'); return { success: true, data: response.data, }; } catch (error) { return this.handleError(error); } }

Other Tools

Related 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