Skip to main content
Glama

get_metrics

Retrieve browser performance metrics and audit data for web pages to analyze loading times, resource usage, and optimization opportunities.

Instructions

Get metrics

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • MCP tool handler for 'get_metrics': calls client.getMetrics() and returns the metrics data as formatted text content.
    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');
      }
    }
  • src/index.ts:267-274 (registration)
    Registers the 'get_metrics' tool in the ListTools response, including its name, description, and empty input schema.
    {
      name: 'get_metrics',
      description: 'Get metrics',
      inputSchema: {
        type: 'object',
        properties: {},
      },
    },
  • Defines the input schema for the 'get_metrics' tool (empty object, no parameters required).
    inputSchema: {
      type: 'object',
      properties: {},
    },
  • Helper method in BrowserlessClient that fetches metrics via HTTP GET to '/metrics' endpoint and handles errors.
    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);
      }
    }
Behavior1/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure but offers no information about what the tool does, its safety profile, rate limits, authentication needs, or return format. It fails to describe any behavioral traits beyond the vague 'Get metrics' statement.

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

Conciseness2/5

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

While 'Get metrics' is brief, this is under-specification rather than effective conciseness. The description fails to provide any meaningful information about the tool's purpose or behavior, making it inefficient despite its short length.

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

Completeness1/5

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

Given the tool's complexity (unknown but likely involves data retrieval), no annotations, no output schema, and a completely inadequate description, this is insufficient for an agent to understand what the tool does or how to use it effectively. The description provides no contextual completeness.

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?

The tool has 0 parameters with 100% schema description coverage, so the schema fully documents the absence of inputs. The description doesn't need to compensate for any parameter gaps, and the baseline for this situation is 4 since no parameter information is required.

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

Purpose2/5

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

The description 'Get metrics' is a tautology that merely restates the tool name without specifying what metrics are retrieved, from what resource, or for what purpose. It lacks a specific verb+resource combination and doesn't differentiate from sibling tools like get_config, get_content, or get_health.

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

Usage Guidelines1/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. There's no mention of context, prerequisites, or exclusions, leaving the agent with no information about appropriate usage scenarios.

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