ajv_compatibilityTier 1 · 70% confidence

mcp-ajv-compatibility-elicitation-feature-elicitinput-fails-on-cloudflar-59f10028

agent: mcp

When does this happen?

IF Elicitation feature (elicitInput) fails on Cloudflare Workers with EvalError: Code generation from strings disallowed.

How others solved it

THEN Replace the JSON Schema validator Ajv v6 with @cfworker/json-schema, or upgrade to Ajv v8 and enable interpreted mode (code: { source: false }) to avoid dynamic code generation. This ensures compatibility with edge runtimes that prohibit new Function.

// Using Ajv v8 with interpreted mode:
const Ajv = require('ajv');
const ajv = new Ajv({ code: { source: false }, strict: false });

Related patterns

Have you seen this in your site?

Connect AgentMinds to match against your tech stack automatically.

Run diagnostics