Skip to main content
Glama

hw_diag

Read-only

Look up TwinCAT diagnostic messages by code to retrieve message text, causes, remedies, class, reaction, and reset details from a device's catalogue or across device types.

Instructions

A diagnosis message by its text id as the diagnosis history shows it (object 0x10F3; '#x4101', '0x4101'): message text, description, causes and remedies, class, reaction, reset — from the device's own catalogue when device is given, else every distinct message with that id and the device types / modules that use it.

Input Schema

NameRequiredDescriptionDefault
codeYes
deviceNo
revisionNo

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.8.12

TDQS

A3.5/5.0
Behavior4/5

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

Annotations already declare a safe read (readOnlyHint=true, destructiveHint=false), so the description is not burdened with safety disclosure; it adds the conditional sourcing behavior (per-device catalogue vs. aggregated cross-device results) and enumerates what the message carries.

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

Conciseness3/5

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

Purpose is front-loaded, but the body is one sprawling sentence with stacked parentheticals and em-dashes, and the opening clause is a fragment ('A diagnosis message by its text id...'), which slows parsing of an otherwise compact definition.

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

Completeness3/5

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

An output schema exists, so the field list is largely redundant and return-shape detail is not required; read-only annotations cover the safety profile. The gap is the unexplained `revision` parameter, which an agent cannot resolve from any structured field.

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 coverage is 0%, so the description must carry the params. It explains `code` (accepted id formats) and `device` (per-device catalogue vs. aggregate view), but `revision` is never mentioned and remains fully undocumented.

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

Purpose4/5

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

States a specific resource (a hardware diagnosis message, object 0x10F3) retrieved by its text id, and gives concrete id formats ('#x4101', '0x4101'). It does not name or contrast any sibling (hw_lookup, hw_search, hw_object), so differentiation is left to inference.

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

Usage Guidelines3/5

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

It implies two usage modes via a parameter condition: pass `device` to read that device's own catalogue, omit it to get every distinct message plus the device types/modules that use it. There is no explicit when-to-use-this-vs-alternatives guidance or mention of prerequisites.

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

Deploy Server

Other Tools