Skip to content

@maxhealth.tech/prefab / mcp / DisplayFormOptions

Interface: DisplayFormOptions

Defined in: mcp/display.ts:134

Extends

Properties

title?

ts
optional title?: string;

Defined in: auto/form.ts:58

Form heading.

Inherited from

AutoFormOptions.title


subtitle?

ts
optional subtitle?: string;

Defined in: auto/form.ts:60

Optional subtitle.

Inherited from

AutoFormOptions.subtitle


submitLabel?

ts
optional submitLabel?: string;

Defined in: auto/form.ts:62

Submit button text. Default 'Submit'.

Inherited from

AutoFormOptions.submitLabel


onSubmit?

ts
optional onSubmit?: 
  | Action
  | Action[];

Defined in: auto/form.ts:64

Custom onSubmit action. Overrides submitTool.

Inherited from

AutoFormOptions.onSubmit


successMessage?

ts
optional successMessage?: string;

Defined in: auto/form.ts:66

Success toast message.

Inherited from

AutoFormOptions.successMessage


errorMessage?

ts
optional errorMessage?: string;

Defined in: auto/form.ts:68

Error toast message.

Inherited from

AutoFormOptions.errorMessage


state?

ts
optional state?: Record<string, unknown>;

Defined in: mcp/display.ts:41

Initial reactive state.

Inherited from

DisplayOptions.state


theme?

ts
optional theme?: Theme;

Defined in: mcp/display.ts:43

Light/dark theme overrides.

Inherited from

DisplayOptions.theme


defs?

ts
optional defs?: Record<string, Component>;

Defined in: mcp/display.ts:45

Reusable component definitions.

Inherited from

DisplayOptions.defs


onMount?

ts
optional onMount?: 
  | Action
  | Action[];

Defined in: mcp/display.ts:47

Action(s) to run when the UI mounts.

Inherited from

DisplayOptions.onMount


keyBindings?

ts
optional keyBindings?: Record<string, 
  | Action
| Action[]>;

Defined in: mcp/display.ts:49

Keyboard shortcuts.

Inherited from

DisplayOptions.keyBindings


cssClass?

ts
optional cssClass?: string;

Defined in: mcp/display.ts:51

Extra CSS class on root element.

Inherited from

DisplayOptions.cssClass


layout?

ts
optional layout?: LayoutHints;

Defined in: mcp/display.ts:53

Size hints for the host container (iframe, panel, etc.).

Inherited from

DisplayOptions.layout


css?

ts
optional css?: string[];

Defined in: mcp/display.ts:55

Inline CSS blocks injected as <style> (merged after the compiled theme).

Inherited from

DisplayOptions.css


stylesheets?

ts
optional stylesheets?: string[];

Defined in: mcp/display.ts:57

External CSS URLs loaded as <link rel="stylesheet">.

Inherited from

DisplayOptions.stylesheets


mode?

ts
optional mode?: ColorMode;

Defined in: mcp/display.ts:59

Force a color scheme regardless of OS preference.

Inherited from

DisplayOptions.mode


pipes?

ts
optional pipes?: Record<string, PipeFn>;

Defined in: mcp/display.ts:61

Custom pipe functions for reactive expressions.

Inherited from

DisplayOptions.pipes


elicit?

ts
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.

Released under the MIT License.