Skip to content

@maxhealth.tech/prefab / mcp / display_form

Function: display_form()

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

Call Signature

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

Defined in: mcp/display.ts:162

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
function display_form(
   fields, 
   submitTool, 
   options): McpInputRequiredResult;

Defined in: mcp/display.ts:167

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.