OpenForm
MCPTools

validate

Last updated on

Validate an OpenForm artifact against the schema and logic rules

Validates an OpenForm artifact (form, document, bundle, or checklist) against the OpenForm schema and optionally checks logic expressions.

Parameters

ParameterTypeRequiredDescription
artifactobjectYesThe OpenForm artifact object to validate
options.schemabooleanNoValidate schema structure (default: true)
options.logicbooleanNoValidate logic expressions (default: true)

Response

FieldTypeDescription
validbooleanWhether the artifact passed validation
detectedKindstringDetected artifact kind: form, document, bundle, or checklist
issuesarrayList of validation issues, each with message and optional path
errorstringError message if validation could not be performed (returned instead of detectedKind and issues)

Example

// Request
{
  "artifact": {
    "kind": "form",
    "title": "My Form",
    "schema": "2026-01-01",
    "fields": []
  }
}

// Response
{
  "valid": true,
  "detectedKind": "form"
}

When validation fails, the response includes the list of issues:

{
  "valid": false,
  "detectedKind": "form",
  "issues": [
    {
      "message": "Required property 'title' is missing",
      "path": ["title"]
    }
  ]
}

Disabling checks

You can disable schema or logic validation independently using the options parameter:

{
  "artifact": { "kind": "form", "..." : "..." },
  "options": {
    "schema": true,
    "logic": false
  }
}

This is useful when you want to validate only the structure without checking logic expressions, or vice versa.

On this page