Skip to main content
Glama

start_coverage

Begin tracking code coverage during PHP debugging sessions to identify untested code paths and improve test quality.

Instructions

Start tracking code coverage during debugging

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Registers the 'start_coverage' MCP tool with the server, defining its description, empty input schema, and inline handler function that initializes code coverage tracking via the CodeCoverageTracker.
    server.tool( 'start_coverage', 'Start tracking code coverage during debugging', {}, async () => { const report = ctx.coverageTracker.startTracking(); return { content: [ { type: 'text', text: JSON.stringify({ success: true, message: 'Code coverage tracking started', }), }, ], }; } );
  • The inline handler function for the 'start_coverage' tool, which calls coverageTracker.startTracking() and returns a success message.
    async () => { const report = ctx.coverageTracker.startTracking(); return { content: [ { type: 'text', text: JSON.stringify({ success: true, message: 'Code coverage tracking started', }), }, ], }; }
  • The core implementation of starting code coverage tracking in the CodeCoverageTracker class, initializing the report structure and setting tracking state.
    startTracking(): CoverageReport { this.currentReport = { startedAt: new Date(), files: new Map(), totalFiles: 0, totalLinesExecuted: 0, uniqueLinesExecuted: 0, }; this.isTracking = true; logger.info('Code coverage tracking started'); 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