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

debugbar_fix_issue

Analyze a specific issue from a DebugBar request, read the implicated PHP source file, and return the exact problematic code with a concrete fix.

Instructions

Analyze a specific issue (exception, N+1, slow query) from a DebugBar request, read the implicated PHP source file, and return the exact problematic code with a concrete fix. This is the primary tool for AI-driven bug fixing.

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_fix_issue"
  }
}

Input Schema

NameRequiredDescriptionDefault
idNoRequest ID. Uses most recent if omitted.
issue_indexNoIssue number from debugbar_analyze output (1-based). Default: 1 (most critical)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A3.5/5.0
Behavior3/5

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

No annotations are supplied, so the description carries the full burden. It usefully discloses that the tool returns code plus a suggested fix rather than applying changes, which tells the agent this is a read/analysis operation. It says nothing about file-access scope, permissions, behavior when the issue or source file cannot be resolved, or whether a live DebugBar session is required.

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 tight sentences, front-loaded with the concrete action sequence and ending with a positioning statement. No filler or redundant restatement of the tool name.

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?

With no output schema and no annotations, the description does state the return shape (problematic code plus a concrete fix), which is the most important gap filled. It still leaves out failure modes, session/connection prerequisites, and how the fix is scoped to the implicated file, which matters for a tool that reads source and proposes changes.

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 both parameters are documented in the schema, including the default-to-most-recent behavior for id and the 1-based default of 1 for issue_index. The description adds no parameter-level meaning beyond that, so the baseline 3 applies.

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?

The description names specific verbs and resources: analyze an issue (exception, N+1, slow query) from a DebugBar request, read the implicated PHP source file, and return the problematic code with a fix. That is far more specific than a tautology and clearly separates it from a plain source reader like debugbar_read_source, though it never names a sibling explicitly.

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?

'This is the primary tool for AI-driven bug fixing' gives a general sense of when to reach for it, and the issue_index parameter ties it to a prior debugbar_analyze call, implying a workflow. However, there is no explicit when-not guidance, no stated prerequisites (e.g. an active DebugBar connection), and no named alternative for cases where the agent only wants raw source.

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