new_audit(webmcp-schema-validity): add audit to check WebMCP schema issues#16973
Open
new_audit(webmcp-schema-validity): add audit to check WebMCP schema issues#16973
Conversation
added 2 commits
April 17, 2026 21:01
paulirish
approved these changes
Apr 20, 2026
| title: 'WebMCP schemas are valid', | ||
| /** Title of a Lighthouse audit that provides detail on WebMCP schema validity. This descriptive title is shown to users when there are schema validity issues. "WebMCP" stands for "Web Model Context Protocol" and should not be translated. */ | ||
| failureTitle: 'WebMCP schemas have validity issues. ' + | ||
| 'Fix them to improve accessibility for AI agents.', |
Member
There was a problem hiding this comment.
drop the second sentence. we dont do 2 sentence titles :)
| /** Title of a Lighthouse audit that evaluates WebMCP schema validity. This descriptive title is shown to users when there are no schema validity issues. "WebMCP" stands for "Web Model Context Protocol" and should not be translated. */ | ||
| title: 'WebMCP schemas are valid', | ||
| /** Title of a Lighthouse audit that provides detail on WebMCP schema validity. This descriptive title is shown to users when there are schema validity issues. "WebMCP" stands for "Web Model Context Protocol" and should not be translated. */ | ||
| failureTitle: 'WebMCP schemas have validity issues. ' + |
Member
| */ | ||
| function getNodeDetailsData(node) { | ||
| let elem = node instanceof Element ? node : node.parentElement; | ||
| if (!elem && node instanceof ShadowRoot) { |
Member
There was a problem hiding this comment.
element = element instanceof ShadowRoot ? element.host : element;
get nodeDetails already does this.
so... hmmm why do you think you needed this?
i'd prefer putting the let elem = node instanceof Element ? node : node.parentElement; case into getNodeDetails itself... i guess for handling Node's that arent Elements and arent shadowRoots?
paulirish
approved these changes
Apr 22, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

New audit will check for issues reported from CDP for declarative WebMCP schemas.
It will report errors for more serious schema issues (missing toolnames), warnings for less serious issues (missing a name for an optional field)
Preview: