Skip to main content
Glama

start_coverage

Begin tracking code coverage during PHP debugging to identify which lines of code are executed during tests or runtime.

Instructions

Start tracking code coverage during debugging

Input Schema

NameRequiredDescriptionDefault

No arguments

Input Schema (JSON Schema)

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

Implementation Reference

  • Registers the 'start_coverage' MCP tool with empty input schema and an inline handler that delegates to CodeCoverageTracker.startTracking() and returns a success message.
    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 core handler logic in CodeCoverageTracker.startTracking(): initializes the coverage report structure, starts tracking, logs the event, and returns the report.
    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