Skip to main content
Glama

error_code_lookup

Look up embedded error codes by table and code to retrieve meanings, troubleshooting steps, and cited sources; list available tables or codes when inputs are omitted.

Instructions

查错误码释义表(外置知识库 knowledge/error_codes/*.json,每条带出处)。

table 留空列出所有可查的表;只给 table 列出该表全部码; table+code 给出该码的释义、排查方向与依据(出处)。 已收录:esp_idf(esp_err_t)/ at_common(AT 通用响应)/ cwjap / cme / modbus_exception / mqtt_rc。 查不到时明说未收录、不给释义——不要拿别的码去猜。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
codeNo
tableNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.7/5.0
Behavior4/5

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

No annotations, so the description carries the behavioral burden, and it does disclose meaningful traits: data source (external JSON knowledge base), citation provenance, enumeration behavior when arguments are omitted, and the no-guessing fallback. It stops short of stating anything about the return shape, but an output schema exists.

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?

Front-loaded purpose, then argument modes, then coverage list, then the failure rule — every sentence carries distinct information with no repetition of the schema or title.

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

Completeness5/5

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

Output schema exists, so return values need not be re-explained. With the source, modes, covered tables, and the not-found behavior all documented, an agent has everything required to invoke it correctly.

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 coverage is 0% with two undocumented params, so the description must compensate — and it largely does, defining the interaction semantics of table and code (blank/only/both) and listing valid table values. It omits any format hints for the code string itself (case, prefixing).

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?

States a specific verb+resource: look up error codes in an external knowledge base (knowledge/error_codes/*.json) with per-entry source citations. It clearly distinguishes itself from lookup siblings (decode_register, decode_fault, symbol_lookup) by scoping to embedded/AT/Modbus/MQTT error codes.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly enumerates the three invocation modes keyed on argument combinations (table blank = list tables, table only = list codes in that table, table+code = definition/troubleshooting/source). It also names the covered tables and gives an explicit when-not rule: say 'not covered' rather than guessing another code.

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