Skip to main content
Glama

analyze_log

Diagnoses embedded firmware failures from serial, compiler, or linker logs by matching 30 common fault patterns and returning plain-language causes with troubleshooting steps.

Instructions

分析日志,识别 30 类常见故障模式(乱码/AT报错/反复重启/HardFault/传感器全0/全FF/ DS18B20恒85/DHT超时/I2C NACK/网络断链/ESP崩溃/掉电/看门狗/固件损坏/CWJAP错误码/ CME错误码/RTOS断言/栈溢出/链接错误/编译错误/I2C扫描空/UART帧错/HAL断言/ADC饱和/ MQTT失败/HTTP错误/SD卡失败等),每条给出人话诊断和排查步骤。 输入可以是 serial_read 的输出、用户粘贴的串口日志、编译器/链接器报错。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
log_textYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.5/5.0
Behavior3/5

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

With no annotations, the description carries the full burden. It discloses that the tool identifies 30 fault patterns and outputs human-readable diagnosis and troubleshooting steps, which is useful behavioral context. But it omits safety/read-only nature, rate limits, or side effects.

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 front-loaded with the core function and an enumerated list of fault patterns, which clarifies scope. The long enumeration is informative but slightly verbose; it could be condensed without losing meaning.

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 simple input schema and the presence of an output schema, the description provides sufficient context: what the tool does, what it detects, and what it outputs. The main gap is sibling differentiation, but that is covered under usage guidelines.

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?

With 0% schema description coverage for the single parameter log_text, the description partially compensates by listing example inputs (serial_read output, pasted logs, compiler errors). It adds meaning but does not specify format, size, or handling of mixed content.

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 verb and resource: '分析日志' (analyze logs) and identifies 30 fault patterns, giving human-readable diagnosis and steps. Clearly defines the tool's function, though it does not explicitly differentiate from siblings like error_code_lookup or decode_fault.

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?

Specifies acceptable input sources (serial_read output, pasted serial logs, compiler/linker errors), implying when to use it. However, it does not state when to prefer alternatives or when not to use it, leaving usage context implied rather than explicit.

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