Skip to main content
Glama

Generate NodeSet2 XML

opcua_model_generate
Read-onlyIdempotent

Generate OPC UA NodeSet2.xml and the symbols CSV from a YAML model. Requires an API key (set OPCUA_MODELER_API_KEY env var). NodeIds stay stable only if each regeneration passes back the symbols of the previous one: pass symbols_csv, or mode "new" for a first generation, or mode "renumber" to change ids on purpose. A call with none of these is refused with SYMBOLS_DECISION_REQUIRED. Returns base64-encoded artifacts if the model is valid. The result lists symbol counts (reused/new/dropped), hints and next steps.

Input Schema

NameRequiredDescriptionDefault
modeNo"new": first generation, no symbols yet. "update": regeneration, symbols required. "renumber": allocate new NodeIds on purpose. Omit when passing symbols.
yamlYesThe full YAML model source to generate from
symbols_csvNoThe symbols CSV of the previous generation (the content of <name>.model.symbols.csv, or the base64 symbols_csv a previous call returned). Keeps NodeIds stable.
include_docsNoSet to true to include markdown documentation (slower)

Output Schema

NameRequiredDescriptionDefault
modeYes
filesNo
hintsYes
validYes
symbolsYes
artifactsNo
next_stepsYes
diagnosticsYes
symbols_sourceYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changed
    • addedInput schema / properties / mode
      Added value: +{
      +  "description": "\"new\": first generation, no symbols yet. \"update\": regeneration, symbols required. \"renumber\": allocate new NodeIds on purpose. Omit when passing symbols.",
      +  "enum": [
      +    "new",
      +    "update",
      +    "renumber"
      +  ],
      +  "type": "string"
      +}
    • addedInput schema / properties / symbols_csv
      Added value: +{
      +  "description": "The symbols CSV of the previous generation (the content of <name>.model.symbols.csv, or the base64 symbols_csv a previous call returned). Keeps NodeIds stable.",
      +  "type": "string"
      +}
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "$schema": "http://json-schema.org/draft-07/schema#",
      +  "additionalProperties": false,
      +  "properties": {
      +    "artifacts": {
      +      "additionalProperties": false,
      +      "properties": {
      +        "documentation_md": {
      +          "type": "string"
      +        },
      +        "nodeset2_xml": {
      +          "type": "string"
      +        },
      +        "symbols_csv": {
      +          "type": "string"
      +        }
      +      },
      +      "required": [
      +        "nodeset2_xml",
      +        "symbols_csv"
      +      ],
      +      "type": "object"
      +    },
      +    "diagnostics": {
      +      "items": {
      +        "additionalProperties": false,
      +        "properties": {
      +          "code": {
      +            "type": "string"
      +          },
      +          "line": {
      +            "type": [
      +              "number",
      +              "null"
      +            ]
      +          },
      +          "message": {
      +            "type": "string"
      +          },
      +          "severity": {
      +            "type": "string"
      +          }
      +        },
      +        "required": [
      +          "severity",
      +          "message"
      +        ],
      +        "type": "object"
      +      },
      +      "type": "array"
      +    },
      +    "files": {
      +      "items": {
      +        "additionalProperties": false,
      +        "properties": {
      +          "bytes": {
      +            "type": "number"
      +          },
      +          "path": {
      +            "type": "string"
      +          },
      +          "role": {
      +            "enum": [
      +              "nodeset",
      +              "symbols",
      +              "documentation"
      +            ],
      +            "type": "string"
      +          },
      +          "status": {
      +            "enum": [
      +              "written",
      +              "unchanged"
      +            ],
      +            "type": "string"
      +          }
      +        },
      +        "required": [
      +          "role",
      +          "path",
      +          "bytes",
      +          "status"
      +        ],
      +        "type": "object"
      +      },
      +      "type": "array"
      +    },
      +    "hints": {
      +      "items": {
      +        "additionalProperties": false,
      +        "properties": {
      +          "code": {
      +            "type": "string"
      +          },
      +          "level": {
      +            "enum": [
      +              "info",
      +              "warning"
      +            ],
      +            "type": "string"
      +          },
      +          "message": {
      +            "type": "string"
      +          }
      +        },
      +        "required": [
      +          "code",
      +          "level",
      +          "message"
      +        ],
      +        "type": "object"
      +      },
      +      "type": "array"
      +    },
      +    "mode": {
      +      "enum": [
      +        "new",
      +        "update",
      +        "renumber"
      +      ],
      +      "type": "string"
      +    },
      +    "next_steps": {
      +      "items": {
      +        "type": "string"
      +      },
      +      "type": "array"
      +    },
      +    "symbols": {
      +      "anyOf": [
      +        {
      +          "additionalProperties": false,
      +          "properties": {
      +            "dropped": {
      +              "type": "number"
      +            },
      +            "dropped_names": {
      +              "items": {
      +                "type": "string"
      +              },
      +              "type": "array"
      +            },
      +            "match": {
      +              "type": "number"
      +            },
      +            "new": {
      +              "type": "number"
      +            },
      +            "new_names": {
      +              "items": {
      +                "type": "string"
      +              },
      +              "type": "array"
      +            },
      +            "renumbered": {
      +              "type": "number"
      +            },
      +            "reused": {
      +              "type": "number"
      +            }
      +          },
      +          "required": [
      +            "reused",
      +            "new",
      +            "dropped",
      +            "renumbered",
      +            "match",
      +            "new_names",
      +            "dropped_names"
      +          ],
      +          "type": "object"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ]
      +    },
      +    "symbols_source": {
      +      "enum": [
      +        "argument",
      +        "paired-file",
      +        "stream",
      +        "none"
      +      ],
      +      "type": "string"
      +    },
      +    "valid": {
      +      "type": "boolean"
      +    }
      +  },
      +  "required": [
      +    "valid",
      +    "mode",
      +    "symbols_source",
      +    "symbols",
      +    "diagnostics",
      +    "hints",
      +    "next_steps"
      +  ],
      +  "type": "object"
      +}
  2. First observed

TDQS

A4.9/5.0
Behavior5/5

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

Annotations only cover the safety profile (readOnlyHint, idempotentHint, openWorldHint); the description adds genuinely new behavior: the OPCUA_MODELER_API_KEY environment variable requirement, the SYMBOLS_DECISION_REQUIRED refusal condition, base64-encoded artifact returns, and the symbol counts/hints/next-steps summary. It does not contradict the read-only, idempotent annotations.

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

Conciseness5/5

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

Front-loaded with the action and artifacts, then the prerequisite, then the branching rules, then the return shape. Five tight sentences with no restatement of the name or schema.

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?

An output schema exists, so return values need not be detailed, yet the description still characterizes the result (symbol counts, hints, next steps). Auth, refusal condition, and the stateful symbols contract are all covered, leaving nothing an agent needs to invoke it correctly.

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

Parameters4/5

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

Schema description coverage is 100%, so the baseline is 3; the description goes beyond the schema by explaining the coupling between symbols_csv and NodeId stability across regenerations, which is the semantic the enum alone does not convey. It does not add anything further about include_docs or the yaml payload shape.

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 concrete verb and two concrete artifacts (OPC UA NodeSet2.xml and symbols CSV) plus the input source (a YAML model). This clearly separates it from siblings like opcua_model_create, opcua_model_reverse and opcua_model_validate, which an agent can rule out from the name alone.

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

Usage Guidelines5/5

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

Explicit routing rules: pass symbols_csv to keep NodeIds stable, mode "new" for a first generation, mode "renumber" to intentionally change ids, and it states that a call with none of these is refused with SYMBOLS_DECISION_REQUIRED. When-to-use and the failure mode are both spelled out.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.