KQ-2073 · SCHEMA/MOULD

Schema Mould

A tool call checked against its schema, drawn as a mould: one cavity per expected field, keyed by its type, and the agent's arguments as pieces keyed by the type of the value they actually hold. When the mould comes into view the pieces pour in a cascade apart, each falling into its cavity on springs.snap as the rim brightens; a value of the wrong type hits the rim and is thrown out beside the mould on springs.recoil with a short reason, and a missing required field leaves its cavity hollow. Every field is a tab stop, Enter edits a rejected value and a fixed value drops back in on springs.snap; below 30rem nested objects fold into rows you open.

KQ-2073 · SCHEMA/MOULD

create_invoice

Rejected

Coldbrook Billing · tool call

10 of 13 fit · 3 arguments outside the mould
currencyenum · USD | EUR | GBP
amount_duenumber
due_datedate
send_emailboolean
po_numberstring
memostring

create_invoice · coldbrook · 3 outside the mould

Install

One command — the source lands in your repo. Or copy it from the Code tab.

$ pnpm dlx shadcn@latest add @kinetiq/schema-mould

Props

tool
string
default "create_invoice"
The tool being called, in mono; also the surface's name.
server
string
default "Coldbrook Billing"
Who serves the tool.
schema
SchemaField[]
default defaultMouldSchema
The expected fields: { name, type, required?, description?, options?, format?, fields?, items? }, nested for objects and arrays.
args / defaultArgs
Record<string, unknown>
default — / defaultMouldArgs
The arguments the agent sent, controlled or initial.
validation
Record<string, string | null>
default —
A path's reason it does not fit, or null when it fits; overrides the built-in type check for that path.
status
"pending" | "rejected" | "running" | "completed" | "error"
default derived
The call's state; rejected while anything is outside the mould, else pending, unless the host says otherwise.
result
string
default —
The tool's reply once the call completed, or the error it gave.
onFixArgument
(path, value) => void
default —
A rejected value was fixed in its editor, with its path and the value parsed by the field's type.
onRun
(args) => void
default —
Run was pressed with every argument in the mould.
onCopy
(json) => void
default —
Copy was pressed; the arguments as JSON, also written to the clipboard when it allows.
trigger
"inView" | "mount"
default "inView"
When the pieces pour into the mould.
mouldStyle
"inset" | "outline" | "cast"
default "inset"
Debossed cavities in a tray, dashed blueprint outlines, or a tinted cast.
density
"compact" | "cozy" | "roomy"
default "cozy"
Row height and piece size.
accent
"cobalt" | "plum" | "mint" | "ink" | string
default "cobalt"
Fitted keys, rims, Run and the cast: a named pigment or any CSS colour.
formatValue
(value, field) => string
default JSON, strings quoted
How a value is written on its piece.
disabled
boolean
default false
Read only: nothing can be fixed or run.
className
string
default —
Classes for the surface; it caps at 36rem tall and the mould scrolls inside.