Skip to content

@maxhealth.tech/prefab / mcp / displayForm

Variable: displayForm

ts
const displayForm: {
  (fields, submitTool, options?): McpDisplayResult<PrefabWireFormat>;
  (fields, submitTool, options): McpInputRequiredResult;
} = display_form;

Defined in: mcp/display.ts:367

MCP display helpers — return prefab UIs as MCP tool results.

Call Signature

ts
(
   fields, 
   submitTool, 
options?): McpDisplayResult<PrefabWireFormat>;

Return a form UI as an MCP tool result.

Submitting the form calls the specified MCP tool (via CallTool). Field definitions map to Input components; the submit action invokes submitTool with all field values.

With elicit, the same fields are returned as an input_required result for hosts that render no UI of their own.

Parameters

ParameterType
fieldsAutoFormField[]
submitToolstring
options?DisplayFormOptions & object

Returns

McpDisplayResult<PrefabWireFormat>

MCP tool result with form prefab UI.

Call Signature

ts
(
   fields, 
   submitTool, 
   options): McpInputRequiredResult;

Return a form UI as an MCP tool result.

Submitting the form calls the specified MCP tool (via CallTool). Field definitions map to Input components; the submit action invokes submitTool with all field values.

With elicit, the same fields are returned as an input_required result for hosts that render no UI of their own.

Parameters

ParameterType
fieldsAutoFormField[]
submitToolstring
optionsDisplayFormOptions & object

Returns

McpInputRequiredResult

MCP tool result with form prefab UI.

Released under the MIT License.