WSG Check

v0.8.1
io.github.ivanoats/wsg-check Checked 4 hours ago Published 14 days ago

Check websites against the W3C Web Sustainability Guidelines and look up the guidelines

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

check_url Check a URL against the WSG

Fetches a page and checks it against the W3C Web Sustainability Guidelines. Returns the score, grade, and each failed or warned check with a recommended fix. Local URLs such as http://localhost:3000 are fetched from the user's machine; they work unless the server was started with --no-local.

ParameterTypeDescription
url *stringThe page to check, e.g. https://example.com or http://localhost:3000
categoriesarrayWSG categories to run. Defaults to all three.
detailstring"summary" (default) returns the score and the failed or warned checks. "full" also returns the complete report, which is much longer.
guidelinesarrayNarrow the run to these guideline slugs (e.g. "minify-and-remove-unused-code") or related-check IDs.
timeoutMsintegerGive up after this many milliseconds. Defaults to 60000.

list_guidelines List WSG guidelines

Lists the guidelines in WSG September-2026, optionally filtered by category, testability, or text in the title, slug, or description. Each entry has the slug to pass to get_guideline or to check_url's guidelines, and how many automated checks implement it.

ParameterTypeDescription
categorystringOnly guidelines in this category
querystringCase-insensitive text to find in the title, slug, or description, e.g. "media"
testabilitystringOnly guidelines that can be tested this way

get_guideline Get a WSG guideline

Returns one guideline: its description, category, testability, W3C specification link, and how many automated checks implement it. Accepts a slug, or a deprecated numeric ID such as "3.3", which is resolved to its current slug.

ParameterTypeDescription
id *stringA guideline slug such as "minify-and-remove-unused-code", or a legacy number