ax-check rule

AXC-D004: Does not say when to use it

The description never says when this is the right choice, for example with "Use this when ...".

ax-check is a checker being prepared for release. This page documents the rule ahead of that release; see all 50 rules.

Severitywarn (info for CLI help, info for OpenAPI)
KindHeuristic. A pattern match: a prompt to look, not a verdict.
Modeax-check lint
Applies toMCP tool lists, OpenAPI, SKILL.md, CLI help
Pattern tagsdescription, selection, skills
Fix in one lineAdd a sentence that starts "Use this when ..." and names the task or question it answers.

The description says what the item does, but never says when it is the right choice. An agent matches a user’s request against descriptions, so a trigger such as “Use this when the user asks why an invoice is unpaid” makes the match far easier than a bare statement of function.

What it checks

ax-check looks for a “when to use” phrase anywhere in the description of each tool, operation, skill and subcommand. If it finds none, it reports the item.

Why it matters

A description of function answers “what does this do?”. An agent is asking a different question: “is this the thing for the request in front of me?”. A sentence that names the task, the question or the situation answers that question directly.

For skills this matters most, because the description is often the only text loaded before the skill is chosen. The Agent Skills specification says the description “Describes what the skill does and when to use it.” Anthropic’s skill authoring guidance (vendor guidance) says it “should include both what the Skill does and when to use it”, and adds: “Always write in third person. The description is injected into the system prompt.”

CLI help and OpenAPI operations are often read by people as well as agents, and their conventions rarely include trigger sentences, so the finding is info there rather than a warning.

How to fix

Add a sentence that starts “Use this when …” and names the task or question it answers. Write it in the third person and describe the user’s situation, not the implementation.

Example

Before

---
name: invoice-reconciliation
description: Matches bank payments to open invoices and marks matched invoices as paid.
---

After

---
name: invoice-reconciliation
description: Matches bank payments to open invoices and marks matched invoices as paid. Use this when the user asks why an invoice still shows as unpaid, or asks to reconcile a bank statement. Do not use it to issue refunds.
---

How ax-check detects it

The rule passes when the description contains any of these phrase families, matched case-insensitively:

  • “use this”, “use it”, or “use” followed by when, whenever, if, for, to, after, before or only, unless the word just before is “not”, “never” or “avoid” (or a contracted negative), so “Do not use this for refunds” does not count;
  • call, invoke, choose, pick, select, run, trigger, load, apply or activate, then “this” or “it”, then when, if, to, for, after or before;
  • “when” followed by you, the user, a user, users, an agent, the agent, asked, needed, working, someone, it is, there is or the task;
  • useful, helpful, appropriate, ideal, intended, designed or meant, followed by for, when, if or to;
  • “triggers on”, “triggers when”, “activates on”, “activates when”;
  • “for questions about”, “for tasks that”, “for requests involving” and similar;
  • “if you need”, “if the user asks”, “if an agent wants” and similar;
  • “start here” or “begin with this”.

The rule does not run when AXC-D002 found a placeholder.

Known false negatives: the match is a phrase, not a meaning. A sentence such as “Designed for internal use” matches “designed for” without naming a task. Check by eye that a real trigger is present.

Known false positives: a trigger written in other words, such as “Answers billing questions from finance staff”, is not recognised. Rephrase it with one of the forms above, or silence the rule with --disable AXC-D004.

Sources

Records in the AX evidence register that share a pattern tag with this rule. A shared tag means the record is about the same pattern, not that it tests this rule. Read the evidence class before the number.