io.github.vlad-public-code/valem
io.github.vlad-public-code/valemValem - Deterministic reactive state models. Create your own calculators/forms with AI
Score: 100/100
Handshake verified by our own probe.
Tools · 35
List the ids of all currently registered Valem models (alphabetical).
Create a new model from a declarative ModelSpec. The spec carries the JSON schema plus derivations (computed fields), constraints (invariants), and optional effects. Returns the created id. Fails (isE…
Get summary info for a model: id, version, and derivation/meta/constraint/effect counts.
Get the full stored ModelSpec JSON for a model.
List the JSONata functions and values a model's library exports — what an expression in this model may call, with signature, arity and originating layer. Call it before writing an expression so you re…
Get a model's merged state (base fields plus all computed derived fields). On a large model this is the biggest context cost — narrow it: pass 'paths' to project only specific subtrees (canonical addr…
Get the value of a single field by its JSON Path address (e.g. "$.order.total"). Evaluates a LAZY derivation on demand.
Apply field mutations to a model and run the reactive pipeline (derivations recompute, constraints enforce, effects dispatch). 'mutations' is a flat map keyed by canonical JSON Path address, e.g. {"$.…
Apply an RFC 6902 JSON Patch document to a model and run the reactive pipeline. Unlike 'mutate' (a flat address→value map), a patch expresses array insert/remove/move and test/copy ops, e.g. [{"op":"a…
Get the effective JSON Schema for a field: the static schema overlaid with LIVE meta-derived constraints (current min/max/required/…). Check this BEFORE writing a value to learn what the reactive pipe…
Capture an immutable point-in-time snapshot of a model's state (base document + derived/meta caches). A natural safety step before a risky evolve_spec: keep the returned snapshot and, if the change go…
Restore a model's state from a snapshot previously returned by 'snapshot' (pass it back verbatim as 'snapshot'). Overwrites the model's current base state. The snapshot must be for the same model.
Explain why a field is what it is: returns the recent derivation/constraint trace records for a path from the in-memory ring buffer (inputs, expression, result). For a constraint use the synthetic pat…
List the ISO-8601 timestamps of a model's committed mutations (most recent 100).
Query a model's durable, append-only audit trail (newest-first): one record per committed reactive cycle (mutations, derivedUpdated, traces, flaggedConstraints, dispatchedEffects, source, sequence). T…
Verify the tamper-evidence hash chain of a model's durable audit trail. Returns {valid, recordsChecked, firstBrokenSequence, detail}; a false 'valid' points at the first altered/reordered/deleted reco…
Store binary content (base64-encoded in 'data') in the content-addressed blob store and get back a BlobRef {$blobId, $mediaType, $bytes} to embed in a model's binary field. Storage is content-addresse…
Fetch a blob's bytes by id, base64-encoded in the result. Pass 'modelId' to fetch a blob referenced by a specific model (access-scoped); omit it for a direct store fetch. Large blobs may exceed the re…
Apply an incremental SpecEvolution diff to a model, preserving live state. Returns the new version. Fails (isError) if the evolved spec is invalid, if expectedVersion no longer matches, or if a schema…
Remove a model from the registry. Fails (isError) if the model does not exist.
Evaluate a model's embedded view definition against current state and return the resolved component tree. Pass an optional 'viewId' for a named view; omit for the default view.
Get vetted instructions for the hard modelling shapes this domain involves (progressive tax/fee charges, per-period schedules, classification, date math, group-by, …). Read the model description in AN…
Validate a ModelSpec WITHOUT creating it: returns a 'valid' flag plus structured findings (errors + warnings, each with a location and message). Use this to iterate on a draft — fix the reported error…
Evaluate a single JSONata expression against a sample input document and return the computed value, or the exact compile/eval error. Write the expr exactly as in a derivation/constraint 'expr': bare d…
Run a spec's embedded test cases (or ad-hoc given->expect cases) through the real reactive pipeline in a throwaway runtime, returning pass/fail plus per-field failures (path, expected, actual). Use th…
Compile a candidate ModelSpec in an ISOLATED throwaway runtime, apply optional sample mutations, and return the resulting merged state (base + derived) — WITHOUT registering it in the live registry. U…
Compile an uploaded .xlsx workbook's OWN formulas into a ready ModelSpec — deterministic transpilation (Excel formula language -> JSONata), never an LLM call: every number the compiled spec computes i…
Deterministic, LLM-free search over an uploaded PDF/DOCX: ranks the document's pages/sections against your query (term-overlap, no embedding model, no network call) and returns the top matches with pa…
Pair this MCP session with a browser tab on the hosted Valem sandbox so both drive the same live model session. Mints a pairing on first call (or resumes an existing not-yet-approved one) and waits up…
How to write a Valem ModelSpec that render_model accepts: sections, path notation, JSONata rules, view components and common mistakes. Call this once before writing your first spec in a conversation.
Show the user a Valem model as an interactive card they can edit in the chat: a form whose computed fields update on every change, checked by a deterministic engine. Use it when the user asks for a ca…
Explain how a value in a Valem card was computed: the formula, the values it read and the inputs it ultimately comes from, as Valem's engine has them for the given inputs. Use it when the user asks wh…
Called by the Valem card when the user edits an input. Not for direct use: call render_model instead.
Show the user one of this server's models (created with create_model) as an interactive card in the chat. Every edit the user makes in the card is a mutate on the model, so get_state and explain see i…
Called by the Valem card when the user edits a stored model. Not for direct use: call mutate instead.
Resources · 28
How to write a Valem ModelSpec: sections, path notation, JSONata rules and common mistakes. Read this before authoring a spec.
valem://guide/model-spec-format
The JSON Schema for a full ModelSpec (the same schema embedded in the create_model tool).
valem://schema/model-spec
The JSON Schema for a SpecEvolution diff (used by the evolve_spec tool).
valem://schema/spec-evolution
The JSONata pitfalls that most often break Valem expressions (bindings, singleton arrays, path dialect). Skim before writing a derivation/constraint expr.
valem://guide/jsonata-gotchas
How to author a SpecEvolution diff: targeted upserts vs wholesale sections, expectedVersion, and state-preserving schema changes. Read before calling evolve_spec.
valem://guide/spec-evolution
How an embedded viewDefinition maps model state to a component tree, the full catalog of legal component types, and the shape get_view returns. Read before authoring a view.
valem://guide/view-system
A ready-to-run example ModelSpec (benefits-eligibility).
valem://examples/benefits-eligibility
A ready-to-run example ModelSpec (car-loan-calculator).
valem://examples/car-loan-calculator
A ready-to-run example ModelSpec (car-tax-estonia).
valem://examples/car-tax-estonia
A ready-to-run example ModelSpec (car-tco).
valem://examples/car-tco
A ready-to-run example ModelSpec (customer-satisfaction-survey).
valem://examples/customer-satisfaction-survey
A ready-to-run example ModelSpec (daily-wellness).
valem://examples/daily-wellness
A ready-to-run example ModelSpec (debt-payoff).
valem://examples/debt-payoff
A ready-to-run example ModelSpec (emergency-fund).
valem://examples/emergency-fund
A ready-to-run example ModelSpec (energy-consumption-heating).
valem://examples/energy-consumption-heating
A ready-to-run example ModelSpec (fire-planner).
valem://examples/fire-planner
A ready-to-run example ModelSpec (insurance-quote).
valem://examples/insurance-quote
A ready-to-run example ModelSpec (net-salary-estonia-2026).
valem://examples/net-salary-estonia-2026
A ready-to-run example ModelSpec (order-items-price-total).
valem://examples/order-items-price-total
A ready-to-run example ModelSpec (personal-budget-tracker).
valem://examples/personal-budget-tracker
A ready-to-run example ModelSpec (rent-vs-buy).
valem://examples/rent-vs-buy
A ready-to-run example ModelSpec (savings-growth).
valem://examples/savings-growth
A ready-to-run example ModelSpec (shipping-cost-estimator).
valem://examples/shipping-cost-estimator
A ready-to-run example ModelSpec (support-ticket-triage).
valem://examples/support-ticket-triage
A ready-to-run example ModelSpec (team-offsite-planner).
valem://examples/team-offsite-planner
A ready-to-run example ModelSpec (tic-tac-toe).
valem://examples/tic-tac-toe
A ready-to-run example ModelSpec (world-clock).
valem://examples/world-clock
The interactive card render_model results are shown in.
ui://valem/model-card.html
How to use
Claude Desktop or claude.ai: add a custom connector (Customize → Connectors; on Team and Enterprise plans an owner adds it under Organization settings → Connectors) with this server URL: https://valem.run/mcp
Cursor or Cline: add to your MCP config:
{
"mcpServers": {
"io.github.vlad-public-code/valem": {
"url": "https://valem.run/mcp",
"transport": "streamable-http"
}
}
}