Skip to content

@maxhealth.tech/prefab / mcp / displayA2ui

Variable: displayA2ui

ts
const displayA2ui: (viewOrApp, options?) => McpDisplayResult<A2uiMessageList> = display_a2ui;

Defined in: mcp/a2ui.ts:190

camelCase alias, matching the other display helpers.

Return a view as an A2UI tool result.

The messages travel as an EmbeddedResource in content, which is where a host looks for a payload it should route to its A2UI renderer, and as structuredContent for hosts that read results structurally.

Parameters

ParameterType
viewOrAppComponent | PrefabApp
options?DisplayA2uiOptions

Returns

McpDisplayResult<A2uiMessageList>

Example

ts
import { display_a2ui } from '@maxhealth.tech/prefab/mcp'
import { autoTable } from '@maxhealth.tech/prefab'

server.registerTool('list-users', schema, async () =>
  display_a2ui(autoTable(await db.users())))

Released under the MIT License.