Skip to main content
Glama

读取异步消息/报错

read_async_messages
Read-onlyIdempotent

Reads Keil async messages and error text from UVSOCK push to capture command status and compilation/programming/debugging errors, with optional clear to reset buffer.

Instructions

读取 Keil 异步消息与报错信息,来自 UVSOCK 推送的 UV_ASYNC_MSG(0x4000)。包含命令执行状态(status)与报错文本(如 '*** error 34: undefined identifier'、编译/烧录/调试失败的弹窗报错内容),用于闭环捕获 Keil 侧错误。clear 可选清空缓存。注意:报错为异步推送,先执行可能出错的操作再读;status 为 Keil 返回的错误码。 【参数】必填: 无;可选: clear 【调用示例】{} 【参数别名】clear ← drain/flush/reset。规范名以上方【参数】行为准;未列出的参数名会被拒绝,不会静默忽略

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
clearNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.8

TDQS

A3.8/5.0
Behavior1/5

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

The description says clear optionally clears the cache, which modifies state, directly contradicting the readOnlyHint annotation that marks the tool as read-only. While it adds useful async context and error-code details, the contradiction makes the behavioral transparency score a 1.

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 compact but information-dense, front-loading the core purpose and then adding structured parameter and alias notes. A slight redundancy exists between the prose and the parameter section, but it remains efficient.

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?

The description covers what is read, when to read, the optional clear behavior, and the nature of the return content. Given the tool's simplicity and the presence of an output schema, it is mostly complete, though the readOnlyHint contradiction leaves a gap in behavioral expectations.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

With schema description coverage at 0%, the description fully compensates by explaining clear as an optional cache-clearing flag, listing aliases (drain/flush/reset), and noting that unlisted parameter names are rejected. This is complete for the single boolean parameter.

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 states a specific verb and resource—reading Keil async messages/errors from UVSOCK, including status and error text. It clearly distinguishes this from sibling tools like read_console_output by naming the source and content type.

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 description gives clear context: use it after performing a potentially failing operation because errors are pushed asynchronously. It also states the purpose (capturing Keil-side errors), but it does not explicitly name alternatives or when not to use the tool.

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