Skip to main content
Glama
industrial-aiops

OT-AIops

mtconnect_sample

Read-only

Fetch recent MTConnect observations from an endpoint as a bounded snapshot or incremental stream, and resume exactly from a prior sequence when needed.

Instructions

[READ][risk=low] Recent observations — a bounded snapshot OR a bounded incremental long-poll stream. Both modes are read-only and can NEVER run unbounded.

Modes:
  - snapshot (default): one /sample page of up to `count` observations. Pass
    `from_sequence` for a single incremental page starting at that sequence.
  - stream: set `max_samples` and/or `duration_s` to poll the agent
    repeatedly, advancing by the header's nextSequence each round, until a
    bound is hit. Feed the returned `next_sequence` back as `from_sequence`
    to resume exactly where you stopped.

Args:
    endpoint: Endpoint name from config.
    count: Max observations per /sample page (1..500, capped server-side).
    from_sequence: Start sequence for an incremental pull (use next_sequence
        from mtconnect_current or a prior call). None = the most recent `count`.
    interval_ms: Poll spacing between rounds in stream mode (0..10000; 0 =
        back-to-back). Client-side spacing — NOT the agent's server-push interval.
    max_samples: Total observation budget across rounds; >0 selects stream mode
        (capped at 2000). 0 = snapshot.
    duration_s: Wall-clock budget in seconds; >0 selects stream mode (capped 120).

Returns dict (snapshot): {endpoint, mode:'snapshot', requested_count,
    from_sequence, next_sequence, first_sequence, last_sequence,
    observation_count, observations:[{data_item_id, type, name, timestamp,
    sequence, value}]}.
Returns dict (stream): {endpoint, mode:'stream', from_sequence, next_sequence,
    observation_count, poll_count, stopped_reason, interval_ms, max_samples,
    observations:[...]}.

Example (snapshot): mtconnect_sample(endpoint="vmc1", count=200).
Example (stream):   mtconnect_sample(endpoint="vmc1", from_sequence=1500,
    interval_ms=1000, max_samples=500, duration_s=30).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
countNo
endpointNo
duration_sNo
interval_msNo
max_samplesNo
from_sequenceNo

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. First observedv0.1.0

TDQS

A4.7/5.0
Behavior5/5

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

Annotations declare readOnlyHint and non-destructive; the description reinforces read-only behavior and adds critical details: both modes are bounded, stream polls with client-side spacing, and returns include stopping reason and sequence advancement. This goes well beyond the annotations.

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?

The description is well-structured with sections, bullet points, and examples. It is somewhat lengthy but justified by the complexity of two modes and multiple parameters. A minor cut could enhance conciseness without losing key information.

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?

Given no output schema, the description covers return structures for both modes, including all fields and examples. It addresses all aspects: purpose, behavior, parameters, and usage context. The description is fully self-sufficient.

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

Parameters5/5

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

All six parameters are explained in detail, including defaults, caps, and mode selection logic. Since the input schema has 0% description coverage, the description fully compensates, making parameter semantics complete and actionable.

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 description clearly states the tool's purpose: providing recent observations as a bounded snapshot or bounded incremental long-poll stream. It defines two modes (snapshot and stream) and distinguishes them, preventing confusion with sibling tools like mtconnect_current or mtconnect_probe. The verb 'sample' and resource 'observations' are specific and well-defined.

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?

The description explains when to use each mode: snapshot for a single page, stream for continuous polling with bounds. It provides examples and mentions using from_sequence from mtconnect_current. However, it does not explicitly compare against other sibling tools for choosing between them, which slightly reduces clarity.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/industrial-aiops/industrial-aiops'

If you have feedback or need assistance with the MCP directory API, please join our Discord server