get_monitoring_status
Retrieve real-time monitoring status and statistics to identify reasoning loops and enable intelligent recovery within the MCP Dual-Cycle Reasoner server.
Instructions
Get current monitoring status and statistics
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/dual-cycle-engine.ts:205-217 (handler)Core implementation of getMonitoringStatus() that returns the current monitoring status object with fields: is_monitoring, intervention_count, current_goal, trace_length.getMonitoringStatus(): { is_monitoring: boolean; intervention_count: number; current_goal: string; trace_length: number; } { return { is_monitoring: this.isMonitoring, intervention_count: this.interventionCount, current_goal: this.currentTrace.goal, trace_length: this.accumulatedActions.length, }; }
- src/server.ts:590-627 (registration)Registers the 'get_monitoring_status' MCP tool including name, description, empty input schema (z.object({})), annotations, and execute handler that delegates to DualCycleEngine.getMonitoringStatus() and returns JSON stringified status.private addGetMonitoringStatusTool(): void { this.server.addTool({ name: 'get_monitoring_status', description: 'Get current monitoring status and statistics', parameters: z.object({}), annotations: { title: 'Get Monitoring Status', readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false, }, execute: async (args, { log, session }) => { try { const sessionEngine = this.getSessionEngine(session); const sessionId = this.sessionIds.get(session); log.debug('Retrieving monitoring status', { sessionId }); const status = sessionEngine.getMonitoringStatus(); log.info('Monitoring status retrieved', { isMonitoring: status.is_monitoring, currentGoal: status.current_goal, traceLength: status.trace_length, interventionCount: status.intervention_count, sessionId, }); return JSON.stringify(status, null, 2); } catch (error) { const errorMessage = error instanceof Error ? error.message : String(error); log.error('Failed to get monitoring status', { error: errorMessage }); throw new UserError(`Failed to get monitoring status: ${errorMessage}`); } }, }); }