Skip to content

new_audit(webmcp-schema-validity): add audit to check WebMCP schema issues#16973

Open
lusayaa wants to merge 10 commits intomainfrom
webmcp-schema
Open

new_audit(webmcp-schema-validity): add audit to check WebMCP schema issues#16973
lusayaa wants to merge 10 commits intomainfrom
webmcp-schema

Conversation

@lusayaa
Copy link
Copy Markdown
Collaborator

@lusayaa lusayaa commented Apr 17, 2026

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:

7VtZ4TKEbNMECBZ 5zsycBB5KzZa26C

@lusayaa lusayaa requested a review from a team as a code owner April 17, 2026 20:05
@lusayaa lusayaa requested review from connorjclark and removed request for a team April 17, 2026 20:05
@lusayaa lusayaa changed the title new_audit(webmcp-schema-validity): add audit to check declarative WebMCP schema issues new_audit(webmcp-schema-validity): add audit to check WebMCP schema issues Apr 17, 2026
@lusayaa lusayaa marked this pull request as draft April 17, 2026 20:15
@lusayaa lusayaa requested a review from paulirish April 20, 2026 14:27
@lusayaa lusayaa marked this pull request as ready for review April 20, 2026 14:27
Comment thread core/audits/webmcp-schema-validity.js Outdated
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.',
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

drop the second sentence. we dont do 2 sentence titles :)

Comment thread core/audits/webmcp-schema-validity.js Outdated
/** 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. ' +
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:)

how about something like WebMCP schema is invalid

Comment thread core/lib/page-functions.js Outdated
*/
function getNodeDetailsData(node) {
let elem = node instanceof Element ? node : node.parentElement;
if (!elem && node instanceof ShadowRoot) {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants