Skip to main content
Glama

subscribe_opcua_nodes

Watch OPC UA nodes for value changes pushed by the server instead of polling them, buffering each update for later retrieval. Stops missed changes and repeated read round trips.

Instructions

Watch one or more OPC UA nodes for value changes instead of polling them. The OPC UA server pushes each new value into a buffer this MCP server keeps; collect them with list_subscriptions or the 'opcua://subscriptions' resource. This is the right way to answer 'tell me when this changes' or 'what has this been doing' over a short window — repeatedly calling read_opcua_nodes both misses changes between calls and costs a round trip each time. Each node gets its own subscription record and its own ID; cancel them with unsubscribe_opcua_nodes. Subscriptions are re-established automatically if the connection drops.

Input Schema

NameRequiredDescriptionDefault
node_idsYesThe OPC UA node IDs to monitor. Example: ['ns=2;i=3']. A single node is a one-element list. Each gets its own OPC UA subscription, and this server holds at most 200 at a time.
buffer_sizeNoHow many of the most recent changes to retain per subscription; older ones are discarded. Default 20, clamped to 1..1000.
deadband_typeNoFilter out changes too small to be worth reporting (OPC UA Part 4 §7.22). 'none' (the default) reports every change the server samples, which on a noisy analogue tag fills the buffer with sensor jitter in about a second. 'absolute' compares against `deadband_value` in the node's own engineering units. 'percent' reads `deadband_value` as a percentage of the node's EURange, and needs the node to publish one.
deadband_valueNoHow far the value must move to be reported, in engineering units for 'absolute' and in percent of EURange for 'percent'. Ignored when `deadband_type` is 'none' or unset; required when it is not.
sampling_intervalNoHow often (ms) the OPC UA server samples each node. 0 (the default) means sample at `publishing_interval`; a shorter interval queues several readings per publish.
data_change_triggerNoWhat counts as a change. 'statusValue' (the default) reports a change of value or of OPC UA status. 'status' reports only status transitions — useful for watching a tag go bad without caring what it reads. 'statusValueTimestamp' also reports a re-sample that changed nothing but the timestamp, which is how to tell 'the value is steady' from 'the value stopped updating'.
publishing_intervalNoHow often (ms) the OPC UA server publishes queued changes. Default 1000. Clamped to at least 50.

Output Schema

NameRequiredDescriptionDefault
resultYes
completenessYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.6/5.0
Behavior5/5

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

Annotations only declare readOnlyHint=false, idempotentHint=false, destructiveHint=false, which says little about lifecycle. The description adds real behavior: the server buffers pushed values, each node gets its own subscription record and ID, subscriptions are re-established automatically if the connection drops, and results are retrieved through a separate tool or resource rather than returned here.

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 the core verb and the anti-pattern it replaces, and every subsequent sentence carries distinct information (collection path, per-node records, cancellation, reconnect behavior). It runs four sentences, slightly longer than strictly necessary, but no sentence is 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?

For a stateful, non-idempotent subscription tool with 7 parameters, the description covers the full lifecycle an agent needs: creation, retrieval of buffered values, cancellation, capacity context, and automatic re-establishment after disconnects. An output schema exists, so return-value detail is correctly left out.

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?

Schema description coverage is 100% and the per-parameter docs are unusually rich (deadband semantics, trigger modes, clamping), so the schema does the heavy lifting. The description only adds that subscriptions are per-node and separately identified, which lightly informs node_ids but adds nothing about buffer_size, deadband, or intervals. 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?

The first sentence gives a specific verb ('Watch') and resource ('one or more OPC UA nodes for value changes') and immediately frames it against polling. Later sentences distinguish it from read_opcua_nodes (polling) and point to list_subscriptions/unsubscribe_opcua_nodes, so an agent can separate it from every relevant sibling without opening a schema.

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 when-to-use framing ('tell me when this changes' or 'what has this been doing' over a short window) plus an explicit when-not alternative: repeatedly calling read_opcua_nodes misses changes between calls and costs a round trip. It also names the follow-up tools (list_subscriptions, the opcua://subscriptions resource) and the cancel path (unsubscribe_opcua_nodes).

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