openclaw - 💡(How to fix) Fix Ajv 2020-12 schema compatibility: playwright-mcp tools fail to initialize [1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
openclaw/openclaw#68772Fetched 2026-04-19 15:07:46
View on GitHub
Comments
0
Participants
1
Timeline
0
Reactions
0
Participants

Error Message

Error: no schema with key or ref "https://json-schema.org/draft/2020-12/schema"

Root Cause

OpenClaw's schema validator uses require("ajv") (draft-07). playwright-mcp v1.60 emits 2020-12 schemas. Ajv draft-07 doesn't have the 2020-12 meta-schema registered.

Code Example

Error: no schema with key or ref "https://json-schema.org/draft/2020-12/schema"
RAW_BUFFERClick to expand / collapse

Bug Description

When using @playwright/mcp v1.60+ as an MCP server in OpenClaw, tool registration fails with:

Error: no schema with key or ref "https://json-schema.org/draft/2020-12/schema"

Environment

  • OpenClaw version: 2026.4.15 (041266a)
  • Node.js: v22.22.0
  • @playwright/mcp: v1.60.0-alpha
  • OS: WSL2 / Linux 6.6.87.2-microsoft-standard-WSL2 (x64)
  • Transport: Docker container (playwright-mcp) via stdio

Steps to Reproduce

  1. Configure playwright-mcp as an MCP server in OpenClaw's config
  2. Start the gateway
  3. Attempt to call any browser-server__* tool
  4. Error occurs during tool catalog initialization

Expected Behavior

Browser automation tools should register and execute normally.

Root Cause

OpenClaw's schema validator uses require("ajv") (draft-07). playwright-mcp v1.60 emits 2020-12 schemas. Ajv draft-07 doesn't have the 2020-12 meta-schema registered.

Suggested Fix

Option A (preferred): Switch to require("ajv/dist/2020") and add draft-07 backward compatibility.

Option B (defensive): Strip $schema from MCP tool inputSchemas before validation.

Broader Impact

This affects any MCP server sending 2020-12 schemas, not just playwright-mcp.

extent analysis

TL;DR

Update the schema validator to support draft-2020-12 schemas by switching to require("ajv/dist/2020") or strip the $schema from MCP tool input schemas before validation.

Guidance

  • Identify the version of ajv being used in OpenClaw and consider updating to a version that supports draft-2020-12 schemas.
  • Verify that the error occurs during tool catalog initialization by checking the logs or debugging the code.
  • Test the suggested fixes, Option A (switching to require("ajv/dist/2020")) or Option B (stripping $schema from MCP tool input schemas), to determine which one resolves the issue.
  • Consider the broader impact of this issue on other MCP servers that may be sending 2020-12 schemas.

Example

// Option A: Switch to ajv/dist/2020
const Ajv2020 = require("ajv/dist/2020");
const ajv = new Ajv2020({ schemaId: "auto" });

// Option B: Strip $schema from MCP tool input schemas
const inputSchema = { ...inputSchema };
delete inputSchema.$schema;

Notes

The issue is specific to the combination of OpenClaw and @playwright/mcp v1.60+, and the suggested fixes may not apply to other versions or configurations.

Recommendation

Apply Option A (switch to require("ajv/dist/2020")) as it is the preferred solution, allowing for backward compatibility with draft-07 schemas.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

openclaw - 💡(How to fix) Fix Ajv 2020-12 schema compatibility: playwright-mcp tools fail to initialize [1 participants]