Skip to content

Validation Rules

Every validation rule that flowmcp schema-check enforces carries a code, a severity, and a one-line description. Rather than collect those rules into a single distant list, the specification keeps each family of rules next to the feature it governs — resource rules live with the resource spec, skill rules with the skill spec, and so on. This page is the wayfinder for that arrangement: it names each rule family, explains its code prefix, and links straight to the section where the rules are defined and explained.

A rule is defined in exactly one place. The page below it in the table is the authoritative home for that code prefix; nothing on this page duplicates those tables. What remains here is the cross-cutting material that belongs to the validation system as a whole — the meaning of each severity level and the shape of the CLI output.


Each rule family is owned by one topic page. Follow the link to read the rules, their severities, and the rationale behind them.

Rule familyCode prefixDefined in
Schema structure, main block, tools, parameters, outputVALSchema Format → Constraints
Parameters, z validation, placeholdersVAL, PHParameters → Z Block (Validation)
Output schemaVALOutput Schema → Validation Rules
Static security scan, library allowlistSECSecurity → Static Security Scan
AgentsAGTAgents → Validation Rules
TestsTSTTests → Validation Rules
Caching / preloadVALPreload & Caching → Validation Rules
PromptsPRMPrompt Architecture → Validation Rules
ResourcesRESResources → Validation Rules
Skills, dependency cross-checksSKL, DEPSkills → Validation Rules
Catalog / registryCATCatalog → Validation Rules
IDs and namespacesIDID Schema → Validation Rules
SelectionsSELSelections → Validation Rules
Shared listsLSTValidation Strategy

The families above are schema-check rules — emitted when flowmcp schema-check validates a schema file. The flowmcp CLI also emits PREFIX-NNN codes at runtime, when a command (call, serve, list, grading, …) hits a caught failure. These share the same format (3–4 uppercase letters, -, three digits; regex ^([A-Z]{3,4}-\d{3})) and the same three severities, but their authoritative home is the CLI implementation, not a schema-spec page: every runtime code is defined at its try/catch site in flowmcp-cli (src/task/FlowMcpCli.mjs). flowmcp doctor reads them back structurally.

NamespaceCode prefixConcern
Shared-list resolution (runtime)LST, HNDa declared sharedLists ref that cannot be located/resolved fails loud (never a silent empty list)
Config / single-sourceCFGreading/validating ~/.flowmcp/config.json and schemaFolders[]
Schema load / resolveSCHloading a schema module or resolving its on-disk path
Tool call / dispatchCAL, CLIcall/argument parsing, tool matching, generic CLI failures
LibrariesLIBresolving requiredLibraries from the CLI base
SQLite / resource add-onsSQLsqlite-gtfs pipeline, resource create/migrate
Cache / sealCCHread/write of the response and seal caches (a missing cache is a normal empty state, not surfaced)
GradingGRDgrading module load, gradings dirs
Health / doctorHLThealth-check probes and doctor
SelectionsSELselection list/show/validate at runtime
SkillsSKLskills-block discovery and count
Env / addons / import / miscENV, ADN, IMP, GRP, NET, HSHenv prompts, add-on load, import, group append, fetch, hashing

LST and SEC are shared with the schema-check namespace by design — the same subject (shared lists, security) keeps one prefix across both static validation and runtime. SEC200SEC299 is reserved for runtime security codes.


SeverityDescriptionEffect
errorMust fix before useSchema cannot be loaded
warningShould fixSchema loads with warnings
infoNice to haveInformational only

The CLI displays results grouped by severity with the rule code, severity, location, and description:

flowmcp schema-check etherscan/contracts.mjs
VAL014 error main.version: Must match ^4\.\d+\.\d+$ (found "1.2.0")
VAL031 error tools: Maximum 8 tools exceeded (found 10)
VAL036 warning getContractAbi: output schema is recommended
TST001 warning getContractAbi: No tests found
2 errors, 2 warnings
Schema cannot be loaded (has errors)

When all rules pass:

flowmcp schema-check etherscan/contracts.mjs
0 errors, 0 warnings
Schema is valid

With security flag:

flowmcp schema-check --security etherscan/contracts.mjs
SEC001 error Line 3: Forbidden pattern "import" detected
SEC017 error main.handlers.preRequest: Non-serializable value (function)
2 errors, 0 warnings
Schema cannot be loaded (has errors)