Skip to main content
Glama

agent_ex_doctor

Diagnose why notifications fail: inspect config, executor binary, and Feishu rejection logs, then return cause and repair commands; optionally send a self-test card to verify delivery.

Instructions

体检:把「通知到底通不通」的证据聚合成结论 + 病因 + 修复命令。 查三类问题:config 本身(关键词/dry_run/webhook/默认profile)、executor 的 bin 是否可执行、 历史通知失败(扫 runner 日志里的飞书拒收记录,按 code 聚合)。 send=true 会额外实发一张正文不含产品名的自检卡——验证通知必须用它, 因为飞书关键词闸门匹配整张卡片,拿真实任务报告当探针会假通过。

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": "agent_ex_doctor"
  }
}

Input Schema

NameRequiredDescriptionDefault
sendNo是否实发自检卡(默认 false,只读体检)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.6.0

TDQS

A3.9/5.0
Behavior4/5

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

With no annotations at all, the description carries the full burden and does substantial work: it states the default is a read-only check ('默认 false,只读体检'), and that send=true produces a real outbound notification card, which is an external side effect the agent must know about before invoking. It also explains why the self-check card's body omits the product name, a non-obvious design constraint. It does not say how expensive the log scan is, whether results are truncated, or what happens when no logs exist.

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?

Front-loaded with a labeled summary ('体检:...') followed by the enumerated checks, then the side-effect caveat, so the reader gets the gist in the first clause. Dense technical jargon (runner 日志, 飞书关键词闸门, 默认profile) is justified by the domain, and no sentence is filler. The final sentence is long and packs two distinct ideas — probe requirement and false-pass reason — but both are load-bearing.

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 one-boolean tool that internally performs config inspection, binary executability checks, log scanning, and an optional outbound send, the description covers what is examined and the one risky behavior. It also implies the return shape (conclusion + cause + fix command), which compensates for the absent output schema. It is not fully complete on scope limits of the log scan or on error states, but nothing critical to correct invocation is missing.

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 coverage is 100% and the single boolean already documents its default, so the schema does the baseline work. The description adds genuine meaning beyond that — send=true triggers an actual outbound message and is the only valid way to verify delivery — but stops short of describing what the sent card looks like or how delivery success/failure is reported back.

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?

The description opens with a specific verb+resource framing ('体检:把通知到底通不通的证据聚合成结论 + 病因 + 修复命令') and then enumerates the three concrete check categories (config keywords/dry_run/webhook/default profile, executor bin executability, historical Feishu rejection codes in runner logs). An agent can tell this is a diagnostic tool rather than a general status tool, though it never names or contrasts with the sibling agent_ex_status, which is the most plausible source of confusion.

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?

It gives an explicit positive rule ('验证通知必须用它') plus a caution about a wrong approach — using a real task report as a probe causes a false pass because the Feishu keyword gate matches the whole card. That is real when-to-use/when-not-to-do-this guidance. What is missing is any routing versus agent_ex_status or agent_ex_version, so the agent must infer the boundary from the sibling names alone.

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