Skip to main content
Glama

AST Anti-Patterns

ast_antipatterns
Read-onlyIdempotent

Detect code anti-patterns via tree-sitter AST: empty catch, await-in-loop, unsafe HTML, as any, non-null assertions, eval, unhandled promises. No regex false positives.

Instructions

Run all built-in tree-sitter anti-pattern rules: empty catch, await-in-loop, dangerouslySetInnerHTML, as any, non-null assertions, eval, unhandled .then(). AST-precise — no regex false positives.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYesAbsolute path to the repository root
Behavior4/5

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

Annotations already declare readOnlyHint=true and idempotentHint=true, so the description's job is to add context beyond safety. It provides a specific rule list and the AST-precision claim, which is a meaningful behavioral trait. No contradiction with annotations.

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?

Two efficient sentences with zero fluff. The action is front-loaded, the rule list is compact, and the precision advantage is stated in a short addendum. Every word earns its place.

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

Completeness3/5

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

The description adequately explains what the tool does but omits any mention of output format or return behavior. Given there is no output schema, a brief note about the type of findings returned would be helpful, though the single-parameter schema and clear purpose make it minimally complete.

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?

The input schema has 100% description coverage for the single 'path' parameter, which is fully documented. The description adds nothing about the parameter beyond what the schema provides, so the baseline of 3 applies.

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 clearly states the verb (run), the resource (all built-in tree-sitter anti-pattern rules), and lists concrete examples (empty catch, await-in-loop, etc.). The phrase 'AST-precise — no regex false positives' differentiates it from regex-based scanners, distinguishing it from siblings such as semgrep_scan or secret_scan.

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 makes the tool's purpose obvious but does not explicitly state when to use it versus alternatives, nor does it name any sibling tools or exclusion conditions. An agent can infer usage from the rule list, but 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.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/CerisonAutomation/argus-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server