npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@swissspidy/webmcp-lint

v0.3.0

Published

Lint rules, snapshot model, schema-driven smoke checks and a webmcp-evals compatible call matcher for WebMCP tool surfaces.

Readme

@swissspidy/webmcp-lint

The rule engine behind @swissspidy/playwright-webmcp, @swissspidy/webmcp-audit and @swissspidy/eslint-plugin-webmcp: a plain-JSON snapshot model for a page's WebMCP tools, lint rules that see the whole page, schema-driven smoke checks, tool contracts, coverage and scoring, and the argument matcher and trajectory matcher of Google's webmcp-evals CLI. No dependencies, no browser required.

npm install --save-dev @swissspidy/webmcp-lint

Lint tool definitions you already have

import { lintTools, formatFindings } from "@swissspidy/webmcp-lint";

const result = lintTools([
  {
    name: "search_products",
    description: "Search the product catalogue by keyword and return matching products.",
    inputSchema: {
      type: "object",
      properties: { query: { type: "string", description: "Keyword" } },
      required: ["query"],
    },
    annotations: { readOnlyHint: true },
  },
]);
console.log(formatFindings(result));
if (result.counts.error) process.exitCode = 1;

lintTools() takes an array of registerTool()-style objects (extra keys such as execute are ignored), a webmcp-evals tools file ({ tools: [...] }, the tools.json the Playwright reporter writes), or a full PageSnapshot. Options are the same as lint(): per-rule config through rules, custom rules through extraRules, and scope: "tool" to run only the rules a single definition can satisfy.

Lint from the command line

npx @swissspidy/webmcp-lint .webmcp-report/tools.json
npx @swissspidy/webmcp-lint tools.json --fail-on warning --rule no-tools=off --rule 'too-many-tools={"max":40}'
cat snapshot.json | npx @swissspidy/webmcp-lint - --format json

Exit code 1 when a finding at or above --fail-on exists (default error), 2 on usage errors. --scope tool skips page-level rules, --url labels the findings, and --format github prints one workflow-command annotation per finding for GitHub Actions.

Lint a live page with any driver

collectFrame is a self-contained function that runs inside a frame and returns that frame's tools and facts. Evaluate it with whatever drives your browser and hand the results to snapshotFromFrames():

import puppeteer from "puppeteer";
import { collectFrame, snapshotFromFrames, lint, formatFindings } from "@swissspidy/webmcp-lint";

const browser = await puppeteer.launch({ args: ["--enable-features=WebMCP"] });
const page = await browser.newPage();
await page.goto("https://shop.example/");
const frames = await Promise.all(page.frames().map((frame) => frame.evaluate(collectFrame)));
const snapshot = snapshotFromFrames(frames, { url: page.url() });
console.log(formatFindings(lint(snapshot)));

@swissspidy/webmcp-lint/collect exports collectFrame alone for bundling into a page. The browser has to implement WebMCP (document.modelContext); see the repository README for how to enable it in Chrome.

Everything else

| Area | Exports | | ------------------ | ----------------------------------------------------------------------------------------- | | Snapshot | collectFrame, snapshotFromFrames, snapshotFromTools, PageSnapshot, ToolSnapshot | | Lint | lint, lintTools, formatFindings, builtinRules, defineRule, Rule.scope | | Matching | matchesArgument, reconcileCalls, evaluateTrajectory | | Evals files | toEvalCase, toToolsSchema, EvalCase, ExpectedCallNode | | Runtime checks | generateArguments, judgeRuns, formatSmokeRuns, SMOKE_RULES | | Contracts and docs | toContract, diffContracts, formatChanges, renderToolDocs, toPlaywrightTest | | Quality signals | computeCoverage, computeScore, judgeTimeline, detectInjection, toolHints |

import { reconcileCalls } from "@swissspidy/webmcp-lint";

// Same semantics as the webmcp-evals CLI:
reconcileCalls(evalCase.expectedCall, calls, { mode: "evals" });

The rule list, matcher semantics and file formats are documented in the repository README.