Research

Research Findings

Analysis of JSON-mode, function calling, and MCP patterns in AI-to-UI communication.

Key Finding

Current systems excel at protocol and data layers (structured outputs, function calling, MCP protocol) but have no standardization for UI presentation primitives. Every framework implements custom UI solutions, creating fragmentation.

JSON-Mode LLM Output

What Works Well

  • Structured outputs with strict mode achieve near-perfect schema adherence
  • Function calling pattern is most reliable across providers
  • SDK integration (Pydantic/Zod) provides type safety and validation
  • Constrained decoding guarantees token-level compliance

What Breaks Down

  • Freeform JSON mode has inconsistent field naming
  • Deep nesting increases validation complexity and truncation risk
  • Complex schemas increase output length and failure risk
  • Conversational contamination requires cleanup

Function Calling Patterns

Three Rendering Strategies

1
Data-Driven

Return structured data, client decides presentation

2
Component-Driven

Return component hints with props

3
Action-Driven

Return user actions for the client to execute

MCP UI Affordances

What MCP Defines

  • Protocol layer for tool discovery
  • Resource and prompt abstractions
  • Capability negotiation

What MCP Excludes

  • UI presentation primitives
  • Visual styling or layout
  • Component definitions

Gap Analysis

All three approaches share a common gap: the layer between semantic intent and visual presentation is undefined. This creates the opportunity for A2UI.

Full research available indocs/a2ui-notes.md