The MVA Pattern
Prerequisites
Install Vurb.ts before following this guide: npm install @vurb/core @modelcontextprotocol/sdk zod — or scaffold a project with vurb create.
45000 displays as dollars instead of cents.The MVA Flow
defineModel(). Declares field types, defaults, fillable profiles, hidden and guarded fields. One source of truth.InvoicePresenter once — every tool reuses it.The Model
Fields not in m.casts() or excluded via m.hidden() never reach the agent. .describe() annotations auto-extract as system rules.
The Presenter
.ui(), arrays use .collectionUi().Context-Aware Rules
When the agent works with users or orders, invoice rules aren't loaded. This is Context Tree-Shaking.
Affordances
Composition
ClientPresenter's rules and UI blocks merge automatically. Define once — reuse across InvoicePresenter, OrderPresenter, ContractPresenter.
Pipeline Integration
The handler (Model) produces raw data. The Presenter (View) shapes perception. The LLM (Agent) acts on structured context.
TIP
The handler can return raw data directly — FluentToolBuilder.handle() auto-wraps non-ToolResponse returns with success().