Anubis.MCP.ElicitationSchema
(anubis_mcp v1.6.0)
Copy Markdown
Validator for the restricted JSON Schema subset allowed in elicitation requests.
Per the MCP 2025-06-18 specification, an elicitation/create requestedSchema
must be a flat object whose properties are all primitives. This module validates
both the schema map itself (validate/1) and content payloads against a
previously validated schema (validate_content/2).
Permitted property schemas:
stringwith optionalminLength,maxLength,format(one of"email","uri","date","date-time")stringenum withenumand optional matchingenumNamesnumber/integerwith optionalminimum,maximumbooleanwith optionaldefault
Summary
Functions
Validates a requestedSchema map fits the elicitation subset.
Validates a content map against an already-validated elicitation schema.
Functions
Validates a requestedSchema map fits the elicitation subset.
Returns :ok or {:error, reason} where reason is a human-readable string.
Validates a content map against an already-validated elicitation schema.
Returns :ok or {:error, reason}.