Skip to content

Native Evals schema validation (MCP 0.3.8, synced to Evals 0.9.0 in 0.3.14)

MCP validates native reports and gate decisions against the published Evals Draft 2020-12 JSON Schemas: Evals 0.7.2 from MCP 0.3.8, and Evals 0.9.0 since MCP 0.3.14. The 0.9.0 documents add optional judge, live-target and target_status fields; see the 0.9.0 note. Exact upstream documents are bundled as package data, generated by scripts/sync_evals_schemas.py through report_schema() / gate_decision_schema(). Validation is offline and requires no runtime Evals or Lens installation. CI compares the copies with accessors from the pinned agentic-evals development dependency (0.10.0 since MCP 0.4.2, with the same 0.9.0 documents) (0.7.2 before 0.3.14).

Unknown fields remain allowed, including nested fields. Unsupported report schema_version markers are rejected explicitly. JSON Schema format annotations are not enforced; downstream model readers retain their existing datetime checks. Caller-supplied $ref strings are ordinary artifact data; no caller schemas or remote resources are resolved. Diagnostics name the failing path and constraint without echoing invalid values.

Schema validity is structural, not AIOS conformance, score arithmetic verification or evidence integrity. A structurally valid failed gate stays failed. Evals owns scoring and release policy; consumers do not invent new verdicts.

MCP usage

Call evals.validate_artifact over local stdio or authenticated HTTP:

{
  "artifact_type": "gate_decision",
  "artifact": {"passed": false, "reasons": ["missing evidence"], "observed": {}}
}

The result has ok: true and valid: true: the structure is valid while artifact.passed is still false. Invalid artifacts return ok: false, valid: false and a field/constraint diagnostic. The tool is read-only and has no sibling prerequisite. spec.validate_artifact remains the separate AIOS tool.

lens.slo_summary, lens.audit_report and lens.score_analysis now validate input reports against the same contract before invoking Lens. The gate produced by lens.slo_summary is validated too. Their Lens prerequisite remains unchanged. Partial or wrongly typed JSON that previously benefited from model defaults or coercion may now be rejected. Submit native JSON (model_dump(mode="json")), not summary-only projections or Python datetime objects.