Skip to main content
Glama

run_best_practices_audit

Audit web pages for best practices to identify performance, accessibility, and SEO issues. Use this tool to evaluate page quality and compliance with web standards.

Instructions

Run a best practices audit on the current page

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Main handler function implementing the 'run_best_practices_audit' tool. Ensures Chromium is running, evaluates JavaScript in the page context to perform checks (HTTPS, mixed content, deprecated tags, viewport meta), parses results, and returns formatted text output.
    async runBestPracticesAudit() {
      await this.ensureChromium();
      
      const result = await this.sendCDPCommand('Runtime.evaluate', {
        expression: `
          const results = [];
          if (location.protocol !== 'https:') {
            results.push('Page is not served over HTTPS');
          }
          
          const httpResources = Array.from(document.querySelectorAll('[src], [href]'))
            .filter(el => (el.src || el.href)?.startsWith('http:'))
            .length;
          
          if (httpResources > 0) {
            results.push(\`Found \${httpResources} HTTP resources on HTTPS page\`);
          }
          
          const deprecatedTags = Array.from(document.querySelectorAll('font, center, big, small, tt')).length;
          if (deprecatedTags > 0) {
            results.push(\`Found \${deprecatedTags} deprecated HTML tags\`);
          }
          
          const viewport = document.querySelector('meta[name="viewport"]');
          if (!viewport) {
            results.push('Missing viewport meta tag for mobile optimization');
          }
          
          JSON.stringify(results.length > 0 ? results : ['Best practices checks passed']);
        `,
        returnByValue: true
      });
      
      const bestPracticesResults = JSON.parse(result.result?.value || '[]');
      
      return {
        content: [{ type: 'text', text: `Best Practices Audit Results:\\n${bestPracticesResults.join('\\n')}` }],
      };
    }
  • index.js:303-310 (registration)
    MCP tool registration entry defining the tool name, description, and empty input schema (no parameters required).
    {
      name: 'run_best_practices_audit',
      description: 'Run a best practices audit on the current page',
      inputSchema: {
        type: 'object',
        properties: {},
      },
    },
  • Input schema for the tool: empty object, indicating no input parameters are required.
    inputSchema: {
      type: 'object',
      properties: {},
    },
  • index.js:385-386 (registration)
    Dispatch case in the main tool request handler switch statement that routes calls to the runBestPracticesAudit method.
    case 'run_best_practices_audit':
      return await this.runBestPracticesAudit();
  • Usage of the method within the comprehensive 'run_audit_mode' tool.
    results.bestPractices = await this.runBestPracticesAudit();
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. It mentions 'Run a best practices audit' which suggests an analysis operation, but doesn't disclose behavioral traits such as whether it's read-only, if it modifies the page, execution time, or output format. This is a significant gap 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, clear sentence with zero waste, front-loading the core action and target. It's appropriately sized for a no-parameter tool, making it efficient and easy to parse.

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 implied by 'best practices audit' and lack of annotations or output schema, the description is incomplete. It doesn't explain what the audit entails, what it returns, or how it differs from other audit tools. This leaves the agent with insufficient context for effective use.

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 no parameter information is needed. The description doesn't add param details, which is appropriate. Baseline is 4 as it compensates adequately for the lack of parameters by not introducing unnecessary complexity.

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

Purpose3/5

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

The description states the action ('Run a best practices audit') and target ('on the current page'), which provides a basic purpose. However, it's vague about what 'best practices' entails compared to sibling tools like run_accessibility_audit or run_seo_audit, lacking specific differentiation. It doesn't restate the name/title tautologically but could be more precise.

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?

No guidance is provided on when to use this tool versus alternatives like run_accessibility_audit or run_seo_audit. The description implies usage on a current page but doesn't specify contexts, prerequisites, or exclusions. This leaves the agent without clear direction for tool selection among similar audit siblings.

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/nfodor/claude-arm64-browser'

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