Skip to main content
Glama
serial-hub-mcp

serial-hub-mcp

by yhuan416

清空串口日志

log_clear

Clear in-memory and persisted logs for a specified serial connection or all connections; use when resetting diagnostics, as cleared data cannot be recovered.

Instructions

清空指定连接(或全部)的日志:内存 + 已落盘文件。清空后不可恢复,谨慎使用。

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "log_clear"
  }
}

Input Schema

NameRequiredDescriptionDefault
connection_idNo连接 ID;省略则清空全部日志

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4/5.0
Behavior4/5

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

No annotations are supplied, so the description carries the full burden, and it does disclose the critical traits: the operation is destructive, irreversible, and wipes two storage tiers (memory plus on-disk files). It leaves out whether permissions are required or what the tool returns, which keeps it short of a 5.

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?

One sentence carries the operation, the scope, both affected storage locations, and the irreversibility warning, with the destructive nature front-loaded in the trailing clause. No filler or redundant restatement of the title.

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?

For a single-optional-parameter tool with no annotations and no output schema, this covers the essential facts an agent needs: what is erased, at which layers, and that it cannot be undone. Only the return behavior and any permission prerequisites are unaddressed, which are minor for this complexity.

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 100%, so the only parameter is already documented as an optional connection ID, and the description merely restates its default behavior (clear all when omitted). Baseline score of 3 applies since it adds no syntax or format detail beyond the schema.

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 names a specific verb and resource (clearing logs) plus the exact scope: a given connection or all connections, and both the in-memory buffer and the persisted files. This immediately distinguishes it from the read-side sibling log_query without needing to open another schema.

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 tells the agent to be cautious and that omitting the connection clears everything, which implies the safe usage pattern, but it never states when this tool should be chosen or that log_query/log_stats should be used for inspection instead. The guidance is 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.