Skip to main content
Glama

ensp_diagnose_error

Diagnose a command error from a Huawei eNSP device to obtain root cause analysis, severity, and fix suggestions.

Instructions

对一条命令错误进行智能诊断,返回根因分析与修复建议。

参数:

  • session_id_or_name:会话 ID 或设备名

  • error_text:设备回显中的错误文本(如 ensp_send_command 返回的 errors

  • command:触发该错误的命令(可选,用于更精准的诊断)

返回:

  • category:错误分类标签

  • severity:严重级别(critical/error/warning/info)

  • root_causes:可能的根因列表

  • probe_commands:建议先执行的探查命令

  • fix_suggestions:修复建议列表

  • confidence:诊断置信度(high/medium/low)

使用场景: 当 ensp_send_command 返回 errored=True 时,将 errors 字段 传入本工具获取诊断,而不是直接放弃或盲目重试。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
commandNo
error_textYes
session_id_or_nameYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.2

TDQS

A4.1/5.0
Behavior3/5

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

No annotations exist, so the description carries the full burden. It discloses the output fields including confidence and severity, which helps the agent interpret results, but says nothing about whether the tool executes probe commands itself (it says probe_commands are suggested, which is good context) or about latency/cost. Partial coverage but not rich.

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?

Structured with labeled sections (参数/返回/使用场景) that make it scannable. Slightly verbose in enumerating returned fields, but each section is front-loaded with purpose first and wastes little.

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?

An output schema exists so return values needn't be explained, yet the description restates them anyway, which is redundant but harmless. For a single-error diagnostic tool with no annotations, the trigger condition, parameters, and output fields are all covered; only alternative-tool routing is thin.

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 0% and the description must compensate, which it does: session_id_or_name, error_text (with a concrete source pointer to ensp_send_command's errors field), and command's optional purpose for more precise diagnosis. That is near-complete coverage of all three params.

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?

Specific verb+resource: '对一条命令错误进行智能诊断' (diagnose a command error) with a clear output contract (root cause analysis and fix suggestions). It is distinguishable from siblings like ensp_diagnose_batch by handling a single error and from ensp_send_command which merely produces the error.

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 使用场景 section gives an explicit trigger and an alternative: when ensp_send_command returns errored=True, pass errors here instead of giving up or blindly retrying. It names a sibling and a behavioral exclusion, though it doesn't contrast with ensp_diagnose_batch or ensp_gather_diagnostic_context.

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