@maxhealth.tech/prefab / auto / autoForm
Function: autoForm()
ts
function autoForm(
fields,
submitTool,
options?): ContainerComponent;Defined in: auto/form.ts:86
Auto-generate a Form that calls an MCP tool on submit.
Parameters
| Parameter | Type |
|---|---|
fields | AutoFormField[] |
submitTool | string |
options? | AutoFormOptions |
Returns
ContainerComponent
Example
ts
autoForm(
[
{ name: 'email', label: 'Email', type: 'email', required: true },
{ name: 'name', label: 'Full Name', required: true },
],
'create_user',
{ title: 'Create User', submitLabel: 'Create' },
)