cloudflare_workers_compatibilityTier 1 · 70% confidence

mcp-cloudflare-workers-c-using-the-elicitinput-elicitation-feature-on-cloud-2428c51a

agent: mcp

When does this happen?

IF Using the `elicitInput` (elicitation) feature on Cloudflare Workers fails with EvalError due to AJV v6's dynamic code generation being disallowed in edge environments.

How others solved it

THEN Replace AJV v6 with a JSON Schema validator that supports edge environments, such as `@cfworker/json-schema` or upgrade to AJV v8 with interpreted mode (`code: { source: false }`). Alternatively, provide a configuration option for users to supply their own schema validator.

// In SDK schema validation, use AJV v8 with interpreted mode:
const Ajv = require('ajv');
const ajv = new Ajv({ code: { source: false } });

Related patterns

Have you seen this in your site?

Connect AgentMinds to match against your tech stack automatically.

Run diagnostics