Skip to main content
Glama
wallter

smart-xdebug-mcp

by wallter

query_history

Retrieve historical values of PHP variables from previous execution steps to track changes over time without re-running the debug session.

Instructions

Query past variable values from the session recorder (time-travel debugging).

WHEN TO USE:

  • To see how a variable changed over execution steps

  • To compare values between steps without re-running

  • To understand state progression leading to a bug

DOES NOT REQUIRE PAUSED STATE - can query history anytime during an active session.

RETURNS: Array of historical values with step numbers and timestamps, showing how the variable changed over time.

LIMITATION: Only variables that were inspected via inspect_variable are recorded. If you didn't inspect a variable at a step, it won't have history for that step.

EXAMPLE USAGE: "What was $user->status 3 steps ago?" query_history("$user->status", steps_ago=3)

"Show me the last 10 values of $total" query_history("$total", limit=10)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNoMaximum number of history entries to return. Useful for seeing variable progression over time.
steps_agoNoHow many steps back to look. 0 = current step, 1 = previous step, 2 = two steps ago, etc.
variable_nameYesPHP variable name to query history for. Example: '$user', '$status', '$order->total'
Behavior5/5

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

Despite no annotations, the description thoroughly explains behavior: it returns an array of historical values with step numbers and timestamps, can be used anytime during an active session, and discloses the key limitation that only variables inspected via inspect_variable are recorded.

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 well-structured with clear headers, bullet points, and an example. Every sentence contributes meaningful information without redundancy, and it is concise yet comprehensive.

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

Completeness5/5

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

Given the complexity of time-travel debugging, no output schema, and full schema coverage, the description is complete: it explains the return format, usage context, limitations, and provides examples. No gaps remain.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so baseline is 3. However, the description adds value by explaining parameter semantics beyond the schema: it includes concrete examples (e.g., 'What was $user->status 3 steps ago?') and clarifies behavior (e.g., limit helps see progression). This justifies a 4.

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 tool queries past variable values from a session recorder for time-travel debugging, with a specific verb ('query') and resource ('past variable values'). It is distinct from siblings like inspect_variable (current value) and control_execution (execution control).

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicit 'WHEN TO USE' section with three bullet points for appropriate contexts, plus a note that it does not require a paused state and a clear limitation about variable tracking, leaving no ambiguity about when to use or not use this tool.

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/wallter/smart-xdebug-mcp'

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