Skip to main content
Glama

stop_coverage

Stop tracking code coverage in PHP applications and generate a report to analyze which code paths were executed during debugging sessions.

Instructions

Stop tracking code coverage and get the report

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The main handler function for the 'stop_coverage' tool. It calls stopTracking on the coverage tracker, gets the summary and report, and returns them as a JSON text content block.
    async () => { ctx.coverageTracker.stopTracking(); const summary = ctx.coverageTracker.getSummary(); const report = ctx.coverageTracker.generateReport(); return { content: [ { type: 'text', text: JSON.stringify({ summary, report }, null, 2), }, ], }; }
  • The registration of the 'stop_coverage' MCP tool using server.tool(), including empty input schema and the handler function.
    server.tool( 'stop_coverage', 'Stop tracking code coverage and get the report', {}, async () => { ctx.coverageTracker.stopTracking(); const summary = ctx.coverageTracker.getSummary(); const report = ctx.coverageTracker.generateReport(); return { content: [ { type: 'text', text: JSON.stringify({ summary, report }, null, 2), }, ], }; } );
  • The CodeCoverageTracker.stopTracking() method called by the tool handler. It finalizes the coverage report by setting end time, stopping tracking, updating statistics, and logging.
    stopTracking(): CoverageReport | null { if (!this.currentReport) return null; this.currentReport.endedAt = new Date(); this.isTracking = false; // Calculate final statistics this.updateStatistics(); logger.info('Code coverage tracking stopped'); return this.currentReport; }

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