Skip to main content
Glama

stop_coverage

Stop tracking code coverage in PHP debugging and generate the coverage report for analysis.

Instructions

Stop tracking code coverage and get the report

Input Schema

NameRequiredDescriptionDefault

No arguments

Input Schema (JSON Schema)

{ "$schema": "http://json-schema.org/draft-07/schema#", "properties": {}, "type": "object" }

Implementation Reference

  • Registration of the 'stop_coverage' MCP tool using server.tool(), including schema (empty input) and 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 handler function that executes the tool logic: stops coverage tracking, retrieves summary and report, and returns them as JSON.
    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), }, ], }; }
  • Core stopTracking() method in CodeCoverageTracker class, which finalizes the coverage report by setting end time, stopping tracking, updating stats, and returning the report.
    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