list_instruments
Retrieve all active debug instruments to monitor and manage debugging sessions in AI-assisted coding workflows.
Instructions
List all active debug instruments.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/index.ts:252-273 (handler)The main handler for the 'list_instruments' tool. It fetches all instruments from the SessionManager and formats a list response, handling the case of no instruments.case 'list_instruments': { const instruments = sessionManager.getInstruments(); if (instruments.length === 0) { return { content: [{ type: 'text', text: 'No active instruments.' }], }; } const list = instruments .map((i) => `- ${i.id}: ${i.file}:${i.line} [${i.capture.join(', ') || 'no capture'}]`) .join('\n'); return { content: [ { type: 'text', text: `Active instruments (${instruments.length}):\n\n${list}`, }, ], }; }
- src/index.ts:93-100 (registration)Tool registration entry in the ListToolsRequestSchema handler, defining the tool's name, description, and empty input schema.{ name: 'list_instruments', description: 'List all active debug instruments.', inputSchema: { type: 'object', properties: {}, }, },
- src/session.ts:85-90 (helper)Helper method in SessionManager that retrieves the list of all active instruments stored in the debug session.getInstruments(): Instrument[] { if (!this.session) { return []; } return Array.from(this.session.instruments.values()); }