pyxel-config-core#

Validation and knowledge core for ESA Pyxel configurations — callable as a plain Python library or as an MCP server that any LLM assistant can use as a tool.

It reuses the same source-of-truth artifacts as Pyxel Config Lab: the Pyxel JSON schema, the model-parameter catalogue, and the tutorial library. The browser GUI and this core stay in lockstep because they read the same bundled contract.

What it exposes#

Capability

Function

MCP tool

CLI

Validate a config against the schema (deep=True also runs pyxel.load())

validate_config(config, deep=False)

validate_pyxel_config

pyxel-config validate [--deep]

Explain: a one-sentence summary and a next step per finding

explain_config(config, deep=False)

explain_pyxel_config

pyxel-config explain [--deep]

Auto-repair a config (rename / re-stage)

autofix(config)

fix_pyxel_config

pyxel-config fix

List valid models (optionally per stage)

list_models(stage=None)

list_pyxel_models

pyxel-config models

Fetch a tutorial

find_tutorial(group, model)

get_pyxel_tutorial

pyxel-config tutorial

Search tutorials (the library uses the vector index once one is built and keywords otherwise; the MCP tool uses keywords unless semantic=true)

search_tutorials(query, semantic=None)

search_pyxel_tutorials

pyxel-config search --keyword

Semantic (vector) tutorial search, with a degraded-mode flag

semantic_search_with_fallback(query)

semantic_search_pyxel_tutorials

pyxel-config search

Model parameters + defaults

model_parameters(model)

get_pyxel_model_parameters

pyxel-config params

Which Pyxel release the bundle tracks

schema_version()

on every validate / explain result

pyxel-config doctor

Three front doors onto one implementation. Whatever the CLI says about a config, the MCP tool says too.

Every input and output is a Pydantic model, so results are structured and schema-checked on both sides of the boundary. Every verdict carries pyxel_version, the Pyxel release the bundled schema was generated from, so a result is never separated from the contract that produced it.

validate_config, explain_config, and autofix all accept either a config dict or a raw YAML string, so an assistant can pass a user’s pasted .yaml straight through without parsing it first.

Where to go next#