validate_croissant
Checks Croissant/GeoCroissant JSON-LD descriptions for syntax, structure, and graph conformance per MLCommons rules to identify blocking errors before publishing.
Instructions
Validates a Croissant or GeoCroissant JSON-LD document.
Runs the official MLCommons ``mlcroissant`` validator: JSON syntax check,
JSON-LD expansion, structure-graph construction (FileObjects/FileSets,
RecordSets, Fields, sources & joins) and full schema conformance checks.
Usage: Call this tool whenever a dataset description is created or edited,
BEFORE publishing it, and after any modification of an existing file.
Works for both plain Croissant documents and documents using the
GeoCroissant extension (`geocr:` properties).
Returns:
--------
Dictionary containing:
- valid: True when the document passes validation.
- errors: Blocking errors reported by the library (empty when valid).
- warnings: Non-blocking recommendations (e.g. missing license).
- is_geospatial: Whether GeoCroissant conformance is declared.
- conforms_to / dataset_name: Extracted metadata when loadable.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| jsonld_url | No | URL of a Croissant/GeoCroissant JSON-LD document. | |
| jsonld_path | No | Path to a local Croissant/GeoCroissant JSON(-LD) file. | |
| jsonld_content | No | Raw JSON string of a Croissant/GeoCroissant document. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||