Skip to main content
Glama
nfodor

Chromium ARM64 Browser

by nfodor

run_nextjs_audit

Audit Next.js applications for performance, SEO, and accessibility issues using automated browser testing on ARM64 devices.

Instructions

Run a Next.js specific audit on the current page

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The core handler function for the 'run_nextjs_audit' tool. It evaluates JavaScript in the browser context to check for Next.js-specific optimizations such as use of Image component, Link for internal navigation, and Head component.
    async runNextJSAudit() {
      await this.ensureChromium();
      
      const result = await this.sendCDPCommand('Runtime.evaluate', {
        expression: `
          const results = [];
          const nextData = document.querySelector('#__NEXT_DATA__');
          if (!nextData) {
            results.push('This does not appear to be a Next.js application');
            JSON.stringify(results);
          } else {
            const nextImages = document.querySelectorAll('img[data-nimg]');
            const regularImages = document.querySelectorAll('img:not([data-nimg])');
            
            if (regularImages.length > 0 && nextImages.length === 0) {
              results.push(\`Consider using Next.js Image component for \${regularImages.length} images\`);
            }
            
            const internalLinks = Array.from(document.querySelectorAll('a[href^="/"]')).length;
            if (internalLinks > 0) {
              results.push(\`Found \${internalLinks} internal links - ensure Next.js Link component is used\`);
            }
            
            const headTags = document.querySelectorAll('meta, title, link[rel="stylesheet"]');
            if (headTags.length < 3) {
              results.push('Consider using Next.js Head component for better SEO');
            }
            
            JSON.stringify(results.length > 0 ? results : ['Next.js specific checks passed']);
          }
        `,
        returnByValue: true
      });
      
      const nextjsResults = JSON.parse(result.result?.value || '[]');
      
      return {
        content: [{ type: 'text', text: `Next.js Audit Results:\\n${nextjsResults.join('\\n')}` }],
      };
    }
  • index.js:311-318 (registration)
    Registration of the 'run_nextjs_audit' tool in the ListToolsRequestSchema response, including name, description, and input schema.
    {
      name: 'run_nextjs_audit',
      description: 'Run a Next.js specific audit on the current page',
      inputSchema: {
        type: 'object',
        properties: {},
      },
    },
  • Input schema for the 'run_nextjs_audit' tool, which takes no parameters (empty properties).
    inputSchema: {
      type: 'object',
      properties: {},
    },
  • Dispatch case in the generic CallToolRequestSchema handler that routes calls to the specific runNextJSAudit method.
    case 'run_nextjs_audit':
      return await this.runNextJSAudit();
Behavior2/5

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

No annotations are provided, so the description carries full burden for behavioral disclosure. While 'Run a Next.js specific audit' implies a read-only analysis operation, it doesn't describe what the audit entails, whether it modifies the page, what permissions are needed, or what the output looks like. For a tool with zero annotation coverage, this is insufficient.

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 that directly states the tool's purpose without any wasted words. It's appropriately sized and front-loaded, making it easy to understand at a glance.

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 lack of annotations and output schema, the description is incomplete. It doesn't explain what a 'Next.js specific audit' involves, what it returns, or how it differs from other audit tools. For a specialized tool in a context with multiple audit options, more detail is needed to be fully helpful.

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 already fully documents the lack of inputs. The description appropriately doesn't add parameter information beyond what's in the schema, maintaining a baseline score of 4 for zero-parameter tools.

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 a Next.js specific audit') and the target ('on the current page'), providing a specific verb+resource combination. However, it doesn't explicitly differentiate from sibling audit tools like 'run_accessibility_audit' or 'run_seo_audit', which would require mentioning what makes a Next.js audit distinct.

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 multiple audit tools available (accessibility, SEO, performance, etc.), there's no indication of what scenarios warrant a Next.js-specific audit or what prerequisites might be needed (e.g., being on a Next.js page).

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/mcp-chromium-arm64'

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