Skip to main content
Glama

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
MAX_DATANoMax data size per variable2048
LOG_LEVELNoLog level: debug, info, warn, errorinfo
MAX_DEPTHNoMax depth for variable inspection3
XDEBUG_HOSTNoHost to bind0.0.0.0
XDEBUG_PORTNoPort to listen for Xdebug connections9003
MAX_CHILDRENNoMax children to return for arrays/objects128
PATH_MAPPINGSNoJSON object mapping container to host paths
COMMAND_TIMEOUTNoCommand timeout in milliseconds30000

Tools

Functions exposed to the LLM to take actions

NameDescription
list_sessions

List all active PHP debug sessions with their current state

get_session_state

Get detailed state of a specific debug session including current position and status

set_active_session

Set which debug session should be the active/default session for subsequent commands

close_session

Close and terminate a debug session

set_breakpoint

Set a breakpoint in PHP code. Supports line breakpoints and conditional breakpoints with hit counts. Can be set before a debug session starts - breakpoints will be applied when a session connects.

set_exception_breakpoint

Set a breakpoint that triggers when a specific exception is thrown. Can be set before a debug session starts.

set_call_breakpoint

Set a breakpoint that triggers when a specific function is called. Can be set before a debug session starts.

remove_breakpoint

Remove a breakpoint by its ID. Works for both active session breakpoints and pending breakpoints.

update_breakpoint

Update a breakpoint (enable/disable or change hit conditions). Works for both active session and pending breakpoints.

list_breakpoints

List all breakpoints including both active session breakpoints and pending breakpoints

continue

Continue script execution until the next breakpoint or end of script

step_into

Step into the next function call, or to the next line if not a function call. This follows execution into called functions.

step_over

Step over to the next line in the current scope. Function calls are executed but not stepped into.

step_out

Step out of the current function. Execution continues until the current function returns.

stop

Stop the debug session and terminate script execution immediately

detach

Detach from the debug session and let the script continue running without debugging

get_stack_trace

Get the current call stack showing all function calls leading to the current position

get_contexts

Get available variable contexts (Local, Superglobals, User-defined constants) at the current position

get_variables

Get all variables at the current execution point. Use context_id to switch between local variables, superglobals, etc.

get_variable

Get a specific variable by name, including nested properties. Use PHP syntax for nested access (e.g., '$user->name', '$array[0]', '$obj->items[2]->value')

set_variable

Set the value of a variable in the current scope

evaluate

Evaluate a PHP expression in the current context. Returns the result of the expression. Use for calculations, method calls, or inspecting computed values.

get_source

Get the source code of a file or a specific line range

add_watch

Add a watch expression that will be evaluated on each break. Watch expressions persist across steps.

remove_watch

Remove a watch expression

evaluate_watches

Evaluate all watch expressions and return their current values

list_watches

List all active watch expressions

add_logpoint

Add a logpoint that logs messages without stopping execution. Use {varName} placeholders for variables.

remove_logpoint

Remove a logpoint

get_logpoint_history

Get the log output history from logpoints

start_profiling

Start profiling to track memory usage and execution time

stop_profiling

Stop profiling and get the results

get_profile_stats

Get current profiling statistics

get_memory_timeline

Get memory usage timeline from profiling

capture_request_context

Capture the current HTTP request context ($_GET, $_POST, $_SESSION, $_COOKIE, headers)

add_step_filter

Add a step filter to skip certain files/directories during stepping (e.g., vendor code)

list_step_filters

List all step filter rules

get_function_history

Get the history of function calls made during debugging

start_coverage

Start tracking code coverage during debugging

stop_coverage

Stop tracking code coverage and get the report

get_coverage_report

Get the current code coverage report

save_debug_profile

Save the current debug configuration (breakpoints, watches, filters) as a named profile

load_debug_profile

Load a saved debug profile

list_debug_profiles

List all saved debug profiles

export_session

Export the current debug session as a report

capture_snapshot

Capture a snapshot of the current debug state for the export report

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

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

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