Skip to main content
Glama

Diagnose

diagnose
Read-onlyIdempotent

Identify PLC communication faults from frame hex, logs, or live host probes. Returns ranked candidates with evidence, root cause, and suggested actions.

Instructions

综合观测给出结构化的故障候选结论 (确定性规则, 不编故事; 全程只读)。

三种证据可任意组合 (至少给一种):

  • frame_hex: 一帧报文 hex (解析 + 校验 + 规则匹配)

  • log_snippet: 通信日志文本, 自动提取其中的 hex 帧逐帧解析

  • host + port: 连上设备做一次探测, 把探测归因纳入推理 返回 DiagnosticReport: candidates 按 confidence 降序, 每条含 symptom/root_cause/evidence(证据链)/suggested_action/next_tools; evidence 与 observations 保留原始观测供复核。空 candidates = 知识库未覆盖, 不硬凑结论。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
hostNo
portNo
unitNo
protocolYes
frame_hexNo
log_snippetNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
candidatesNo
next_toolsNo
observationsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.4.0

TDQS

A4/5.0
Behavior5/5

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

Annotations already cover read-only, idempotent, open-world, non-destructive. The description goes beyond annotations by disclosing that it uses deterministic rules ('不编故事'), performs a live probe when host+port is used, automatically extracts hex frames from log_snippet, and returns empty candidates rather than forcing a conclusion when the knowledge base doesn't cover the case. These are important behavioral traits that an agent needs to know. No contradiction with 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?

The description is front-loaded with the core purpose, then structured as a bulleted list of evidence sources and output details. Every sentence earns its place, and the formatting makes the options and constraints easily scannable. It is not overly verbose despite including substantial behavior and return information.

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

Completeness4/5

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

Given the tool's complexity (6 params, multiple evidence modes, output schema), the description is largely complete. It explains the output structure and the meaning of empty candidates. The main gaps are the lack of explanation for the required protocol parameter, no guidance on when to use this vs. sibling tools, and no mention of any network/access requirements for the host+port probing mode. These are notable but not fatal, so a 4 is appropriate.

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 0%, so the description must compensate. It explains the semantics of frame_hex, log_snippet, and host+port as evidence types, including how they are processed. However, it does not mention the required protocol parameter or the unit parameter at all, leaving an agent to guess what values are expected. Thus it adds meaning to half the parameters but fails to clarify critical required inputs.

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?

The description clearly states the tool's purpose: to produce structured fault candidate conclusions from observations. It specifies the resource (observations) and the output (DiagnosticReport with candidates), and distinguishes its reasoning behavior (deterministic rules, no fabrication) from simpler parse/validate tools. However, it does not explicitly name sibling tools or state when this tool is preferred over them, so it lacks explicit sibling differentiation.

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?

The description implies the use case: when you have at least one evidence source (frame_hex, log_snippet, host+port) and want a diagnostic conclusion, you can call this tool. It lists acceptable evidence combinations and the condition 'at least one'. But it does not name alternatives like validate_frame or parse_frame, nor does it specify when not to use this tool, so usage guidance is only implied, not explicit.

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