Skip to main content
Glama

detect_antipatterns

Identify performance antipatterns like N+1 queries, missing indexes, and memory leaks through static analysis across ORMs including Eloquent, Sequelize, and TypeORM.

Instructions

Detect performance antipatterns: N+1 query risks, missing eager loading, unbounded queries, event listener leaks, circular model dependencies, missing indexes, memory leaks (unbounded caches, closure leaks). Static analysis across all indexed ORMs (Eloquent, Sequelize, Mongoose, Django, Prisma, TypeORM, Drizzle).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
categoryNoAntipattern categories to check (default: all)
file_patternNoFilter to files matching this pattern
severity_thresholdNoMinimum severity to report (default: low)
limitNoMax findings to return (default: 100)
Behavior2/5

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

No annotations are provided, so the description carries the full burden. It mentions 'static analysis' and lists antipatterns but doesn't disclose behavioral traits like whether it requires specific permissions, how long it runs, if it modifies code, or what the output format is. This is a significant gap for a tool with no annotation coverage.

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?

The description is efficiently structured in two sentences: the first states the purpose with specific examples, and the second clarifies the scope across ORMs. Every sentence adds value without redundancy, making it front-loaded and concise.

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?

Given no annotations and no output schema, the description provides a clear purpose and scope but lacks details on behavior, output format, and usage context. For a tool with 4 parameters and no structured safety or output information, it's adequate but has clear gaps in completeness.

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 description coverage is 100%, so the schema already documents all parameters. The description doesn't add any parameter-specific details beyond what's in the schema, such as explaining how 'file_pattern' interacts with ORM detection or what 'severity_threshold' means in practice. Baseline 3 is appropriate when schema does the heavy lifting.

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 'detect' and the resource 'performance antipatterns', with specific examples like N+1 query risks and missing eager loading. It distinguishes from siblings by focusing on static analysis across ORMs, unlike tools like 'scan_code_smells' or 'check_quality_gates' which are more general.

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 implies usage for performance analysis across ORMs but doesn't explicitly state when to use this tool versus alternatives like 'scan_code_smells' or 'get_optimization_report'. No exclusions or prerequisites are mentioned, leaving the context somewhat open-ended.

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/nikolai-vysotskyi/trace-mcp'

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