Fusion UX

Dynamic UI generation and validation tools for model-generated interfaces

/api/tools/fusion-ux

1 Tool

validate_fusion_fragment

Validates a fusion-fragment template and returns errors or a preview. Use this tool to check your fusion-fragment template before outputting it. The tool will: 1. Validate the template structure (required fields, valid property values) 2. Check that all field.key values exist in the provided dataKeys 3. Suggest corrections for typos (fuzzy matching) 4. Return a text preview of the template structure Template structure: - sections: Array of section objects (required) - title: Optional string title - footer: Optional footer text Section structure: - title: Section header (required) - layout: "grid-2", "grid-3", "grid-4", or "list" (default: "grid-3") - collapsed: Boolean for initial state - fields: Array of field objects (required) Field structure: - label: Display label (required) - key: Data key to look up (required, must exist in dataKeys) - format: "text", "number", "currency", "percent", "date", "boolean" - unit: Unit string to display after value - editable: Boolean to allow editing - highlight: "success", "warning", "error", "info" - tooltip: Hover tooltip text - decimals: Number of decimal places (for number/currency/percent) - currency: Currency code (for currency format)

Tool

Endpoint

POST /api/tools/fusion-ux

Input Schema

template *
object
The fusion-fragment template to validate. Must have a "sections" array with field definitions.
dataKeys *
array
List of available data keys that can be used in field.key (e.g., ["firmName", "fundName", "vintageYear"])
sampleData
object
Optional sample data for preview rendering. If not provided, placeholder values will be generated.
preview
string
Preview mode: "text" returns a text description, "none" validates only (default: "text")
View full schema
{ "type": "object", "properties": { "template": { "type": "object", "description": "The fusion-fragment template to validate. Must have a \"sections\" array with field definitions." }, "dataKeys": { "type": "array", "items": { "type": "string" }, "description": "List of available data keys that can be used in field.key (e.g., [\"firmName\", \"fundName\", \"vintageYear\"])" }, "sampleData": { "type": "object", "description": "Optional sample data for preview rendering. If not provided, placeholder values will be generated." }, "preview": { "type": "string", "enum": [ "text", "none" ], "description": "Preview mode: \"text\" returns a text description, \"none\" validates only (default: \"text\")" } }, "required": [ "template", "dataKeys" ] }