stop_profiling
Ends PHP profiling sessions to retrieve performance analysis data for debugging optimization.
Instructions
Stop profiling and get the results
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Input Schema (JSON Schema)
{
"$schema": "http://json-schema.org/draft-07/schema#",
"properties": {},
"type": "object"
}
Implementation Reference
- src/tools/advanced.ts:242-259 (handler)Handler and registration for the 'stop_profiling' MCP tool. Ends the current profiling session via Profiler.endSession() and returns JSON-formatted profiling statistics.server.tool( 'stop_profiling', 'Stop profiling and get the results', {}, async () => { const session = ctx.profiler.endSession(); if (!session) { return { content: [{ type: 'text', text: JSON.stringify({ error: 'No active profiling session' }) }], }; } const stats = ctx.profiler.getStatistics(); return { content: [{ type: 'text', text: JSON.stringify(stats, null, 2) }], }; } );