Skip to main content
Glama
mcp-php-debugbar
by movinginfo

debugbar_get_duplicate_queries

Detect duplicate or redundant SQL queries in a request to identify N+1 performance issues and guide fixes.

Instructions

Detect duplicate/redundant SQL queries in a request — a common performance issue in Laravel (N+1 problem).

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

Input Schema

NameRequiredDescriptionDefault
idNoRequest ID. Uses most recent if omitted.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

B3.2/5.0
Behavior2/5

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

No annotations are supplied, so the description carries the full behavioral burden and largely does not meet it. It does not state that this is a read-only analysis, what the result looks like (list of duplicate groups? counts?), or what happens when no duplicates exist. It only adds the scope hint that detection is per-request.

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?

One front-loaded sentence with the action first and the N+1 rationale as a trailing gloss; no filler. It could be slightly tighter, but every clause contributes to identifying the tool's purpose.

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?

For a single optional-parameter read tool with no output schema, the description covers the 'what' adequately but leaves the return shape and the empty-result case unstated. An agent knows when the tool is conceptually relevant but not what it will get back.

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% and the single optional `id` parameter is fully documented in the schema, including the 'uses most recent if omitted' default. The description adds nothing about the parameter, so the baseline of 3 applies rather than credit for extra meaning.

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?

Names a specific verb (detect) and a specific resource (duplicate/redundant SQL queries within a request), and adds the Laravel N+1 framing so the agent knows the class of problem. It implicitly differs from debugbar_get_queries (raw listing), but never names that sibling, so the differentiation is left to inference.

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 phrase 'a common performance issue in Laravel (N+1 problem)' implies this is the tool to reach for during performance triage, but there is no explicit when-to-use or when-not-to-use statement. Nothing tells the agent whether to call this before or instead of debugbar_get_queries or debugbar_compare_queries.

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