Documentation / @agentick/mcp / validateFormSchemaFlatness
Function: validateFormSchemaFlatness()
validateFormSchemaFlatness(
schema):string[]
Defined in: server/elicitation.ts:144
Walk a JSON Schema produced from a Zod object and verify it conforms to the spec's "flat object with primitive properties" rule. Returns an array of validation messages (empty on success).
Allowed at the property level:
string,number,integer,booleanprimitives- String enum (single-select)
arraywhoseitems.type === "string"(with optional enum)
Disallowed:
- Nested
objecttypes arrayof non-primitive items- Discriminated unions, intersections, anyOf at the property level (other than the spec-defined oneOf+const+title labeled-enum form)
Parameters
schema
Record<string, unknown>
Returns
string[]