Skip to main content
Glama
robinafaruqia

ai-backend-performance-mcp

analyze_database_queries

Detect MongoDB and PostgreSQL query anti-patterns like N+1 queries, unbounded finds, and sequential calls in your Node.js code to improve database performance.

Instructions

Detect MongoDB/PostgreSQL query anti-patterns such as N+1 queries, unbounded finds, and sequential query calls.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
projectPathYesAbsolute or relative path to the Node.js project to analyze
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 disclosure burden. It states what is detected but not how the tool behaves — whether it performs static code scanning or connects to live databases, whether credentials or a running instance are required, or what the return format looks like. 'Detect' implies a read-only analysis, but the mechanism, prerequisites, and side-effect profile are undisclosed.

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?

A single, tightly-packed sentence that leads with the verb and detection scope, then supplies concrete anti-pattern examples. There is zero filler and the most important information is front-loaded. Efficient and well-structured.

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?

Adequate but gapped. The purpose and single parameter are fully covered, but for a detection tool with no output schema and no annotations, the agent is left without guidance on what the analysis returns, what prerequisites exist (a Node.js project using these databases), or what the tool's behavior is at runtime. These gaps matter more given the absence of structured annotations and an output schema.

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%, with projectPath fully documented as 'Absolute or relative path to the Node.js project to analyze'. The description adds no additional parameter meaning beyond what the schema provides, so the baseline of 3 applies — the schema carries the weight adequately.

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 uses a specific verb ('Detect') plus a clear resource ('MongoDB/PostgreSQL query anti-patterns') and enumerates concrete examples (N+1 queries, unbounded finds, sequential query calls). This clearly differentiates it from its siblings — analyze_indexes targets indexes, analyze_connection_pooling targets connections, analyze_async_patterns targets async code — leaving no ambiguity about what this tool covers.

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 purpose implies the usage context (use when analyzing database access patterns in a Node.js project), but the description never explicitly states when to choose this tool over its overlapping siblings, particularly analyze_indexes which lives in the same database-performance domain. There is no when-not-to-use guidance or named alternative, leaving the agent to infer the boundary.

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/robinafaruqia/ai-backend-performance-mcp'

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