@maxhealth.tech/prefab / mcp / McpToolResult
Type Alias: McpToolResult<S>
type McpToolResult<S> = object;Defined in: mcp/types.ts:96
MCP tool result — returned from tool handlers.
Structurally assignable to the SDK's CallToolResult. The index signature allows the SDK's Result base interface to be satisfied without a cast.
structuredContent is generic rather than Record<string, unknown>: protocol revision 2026-07-28 loosened it to any JSON value (SEP-2106), and keeping the payload type lets callers read it back without casting.
The wire discriminator resultType (SEP-2322) is intentionally absent. The SDK's protocol layer stamps it on encode and strips it before results reach consumers, so handlers do not author it for ordinary complete results. The index signature still admits resultType: 'input_required' for the one case a handler does own — multi-round-trip interim results.
Type Parameters
| Type Parameter | Default type |
|---|---|
S | unknown |
Indexable
[key: string]: unknownProperties
content
content: McpContent[];Defined in: mcp/types.ts:97
structuredContent?
optional structuredContent?: S;Defined in: mcp/types.ts:99
Structured payload forwarded to MCP Apps iframes via ui/notifications/tool-result.
isError?
optional isError?: boolean;Defined in: mcp/types.ts:100
_meta?
optional _meta?: Record<string, unknown>;Defined in: mcp/types.ts:101