build-system-prompt
Generates a custom MDMA prompt from structured input (domain, components, fields, steps). Returns only the custom prompt part — use buildSystemPrompt({ customPrompt }) in code to combine it with the base MDMA spec.
Instructions
Generates a custom MDMA prompt from structured input (domain, components, fields, steps). Returns only the custom prompt part — use buildSystemPrompt({ customPrompt }) in code to combine it with the base MDMA spec. When dataSources (an external data-source catalog) is passed, returns the full system prompt instead: base MDMA spec, the data-source catalog with the rule to reference it via { source, params }, and the custom part.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| steps | No | Multi-step flow definitions — each step becomes a separate conversation turn | |
| domain | No | Domain context (e.g. "HR onboarding", "expense approval") | |
| fields | No | Form field definitions | |
| components | No | Component types to use (e.g. ["form", "approval-gate", "webhook"]) | |
| dataSources | No | External data-source catalog. Each entry: name, optional description, kind ("rows" for table.data, "series" for chart.data, "options" for form select options), optional columns [{ key, type: string|number|boolean|date, description?, sensitive? }], optional params [{ name, type: string|number|boolean, required?, allowed? }]. Names must be unique, but the same data may appear as a rows and a series entry under different names. The model is told to reference sources via { source, params } instead of generating rows. | |
| businessRules | No | Business rules or constraints |