lint_sparkplug_topic
Validate MQTT topic strings against Sparkplug B grammar, returning ordered findings and parsed parts to catch naming, message-type, wildcard, and character errors.
Instructions
Validate one or more MQTT topic strings against the Sparkplug B topic grammar (Sparkplug 3.0). Free, no API key, no account: the grammar runs locally inside this server and nothing is sent anywhere. Call this whenever a topic that is meant to be Sparkplug appears in a config, a broker trace, a code review, or a user question -- it is faster and far more reliable than reasoning about the grammar from memory. It checks the spBv1.0 namespace level, the eight message types (NBIRTH/NDEATH/DBIRTH/DDEATH/NDATA/DDATA/NCMD/DCMD) plus STATE, node-vs-device level count, the legacy Sparkplug 2.2 STATE form, publish-side MQTT wildcards, empty levels, and identifier characters that break downstream consumers. It returns ordered findings (fail / warn / pass / info) with the parsed topic parts, not a yes/no. It does NOT connect to a broker, decode payloads, or check whether the device actually exists.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| topics | Yes | One topic string, or an array of topic strings. A single string containing newlines is also accepted and split per line. |