Skip to main content
Glama
dxpert-ai

dxpert UNS Tools: Sparkplug B & Unified Namespace Linter for IIoT

Official

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

TableJSON Schema
NameRequiredDescriptionDefault
topicsYesOne topic string, or an array of topic strings. A single string containing newlines is also accepted and split per line.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.4/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden and does so: it discloses the local-only execution model (no API key, nothing sent anywhere), the exact grammar areas checked, the return shape (ordered fail/warn/pass/info findings with parsed parts, not a boolean), and three things it explicitly does not do.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded with purpose and cost model, then scope, then return shape, then exclusions; every sentence contributes. It runs slightly long and the message-type enumeration is dense, but there is no filler.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With no output schema and no annotations, the description fully compensates by describing the return format, severity vocabulary, and negative scope. An agent has everything needed to decide to call it and to interpret the result.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

One parameter with 100% schema description coverage; the schema already documents the string-or-array union and the newline-splitting behavior. The description only restates 'one or more MQTT topic strings', adding nothing the schema does not already say, so the baseline 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource ('Validate ... MQTT topic strings against the Sparkplug B topic grammar') with version scope (Sparkplug 3.0). The scope is narrow enough that an agent can distinguish it from check_uns_namespace and run_readiness_diagnostic without opening any schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives an explicit trigger list (topic appears in a config, broker trace, code review, or user question) and explicit non-goals (does not connect to a broker, decode payloads, or check device existence). It never routes to the sibling tools, so the alternative-selection clause is missing, but the when/when-not guidance is unusually clear.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.