@maxhealth.tech/prefab / mcp / DisplayFormOptions
Interface: DisplayFormOptions
Defined in: mcp/display.ts:134
Extends
Properties
title?
optional title?: string;Defined in: auto/form.ts:58
Form heading.
Inherited from
subtitle?
optional subtitle?: string;Defined in: auto/form.ts:60
Optional subtitle.
Inherited from
submitLabel?
optional submitLabel?: string;Defined in: auto/form.ts:62
Submit button text. Default 'Submit'.
Inherited from
onSubmit?
optional onSubmit?:
| Action
| Action[];Defined in: auto/form.ts:64
Custom onSubmit action. Overrides submitTool.
Inherited from
successMessage?
optional successMessage?: string;Defined in: auto/form.ts:66
Success toast message.
Inherited from
AutoFormOptions.successMessage
errorMessage?
optional errorMessage?: string;Defined in: auto/form.ts:68
Error toast message.
Inherited from
state?
optional state?: Record<string, unknown>;Defined in: mcp/display.ts:41
Initial reactive state.
Inherited from
theme?
optional theme?: Theme;Defined in: mcp/display.ts:43
Light/dark theme overrides.
Inherited from
defs?
optional defs?: Record<string, Component>;Defined in: mcp/display.ts:45
Reusable component definitions.
Inherited from
onMount?
optional onMount?:
| Action
| Action[];Defined in: mcp/display.ts:47
Action(s) to run when the UI mounts.
Inherited from
keyBindings?
optional keyBindings?: Record<string,
| Action
| Action[]>;Defined in: mcp/display.ts:49
Keyboard shortcuts.
Inherited from
cssClass?
optional cssClass?: string;Defined in: mcp/display.ts:51
Extra CSS class on root element.
Inherited from
layout?
optional layout?: LayoutHints;Defined in: mcp/display.ts:53
Size hints for the host container (iframe, panel, etc.).
Inherited from
css?
optional css?: string[];Defined in: mcp/display.ts:55
Inline CSS blocks injected as <style> (merged after the compiled theme).
Inherited from
stylesheets?
optional stylesheets?: string[];Defined in: mcp/display.ts:57
External CSS URLs loaded as <link rel="stylesheet">.
Inherited from
mode?
optional mode?: ColorMode;Defined in: mcp/display.ts:59
Force a color scheme regardless of OS preference.
Inherited from
pipes?
optional pipes?: Record<string, PipeFn>;Defined in: mcp/display.ts:61
Custom pipe functions for reactive expressions.
Inherited from
elicit?
optional elicit?: boolean | FormInputRequestOptions;Defined in: mcp/display.ts:147
Ask the client to collect the fields instead of rendering them.
A prefab form only exists on a host that renders UI. Protocol revision 2026-07-28 gives every other host a native path: return an input_required result, the client shows its own form and retries the call. Pass true for the defaults, or an options object to set the response key, the prompt, or a signed requestState.
The answer comes back through acceptedFormInput, which checks it against the same field list. See ./input-required.ts for the full handler shape.