Skip to main content
Glama
cyqlelabs

MCP Dual-Cycle Reasoner

by cyqlelabs

start_monitoring

Initiate metacognitive monitoring to track and analyze an agent's reasoning process, ensuring alignment with specified goals and initial beliefs for effective task execution.

Instructions

Start metacognitive monitoring of an agent's cognitive process

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
goalYesCurrent goal being pursued
initial_beliefsNoInitial beliefs about the task and environment

Implementation Reference

  • The execute function serving as the MCP tool handler for 'start_monitoring'. It retrieves the session engine, logs the start, calls startMonitoring on the engine with goal and initial beliefs, and returns a success message.
    execute: async (args, { log, session }) => { try { const sessionEngine = this.getSessionEngine(session); const sessionId = this.sessionIds.get(session); log.info('Starting metacognitive monitoring', { goal: args.goal, initialBeliefsCount: args.initial_beliefs.length, sessionId, }); await sessionEngine.startMonitoring(args.goal, args.initial_beliefs); log.info('Monitoring started successfully'); return `✅ Metacognitive monitoring started for goal: "${args.goal}" with ${args.initial_beliefs.length} initial beliefs`; } catch (error) { const errorMessage = error instanceof Error ? error.message : String(error); log.error('Failed to start monitoring', { error: errorMessage }); throw new UserError(`Failed to start monitoring: ${errorMessage}`); } },
  • Zod schema defining input parameters for the start_monitoring tool: goal (required string), initial_beliefs (optional array of strings, defaults to []).
    parameters: z.object({ goal: z.string().describe(DESCRIPTIONS.GOAL), initial_beliefs: z .array(z.string()) .optional() .default([]) .describe(DESCRIPTIONS.INITIAL_BELIEFS), }),
  • src/server.ts:236-236 (registration)
    Registration of the 'start_monitoring' tool on the FastMCP server inside addStartMonitoringTool method. The full tool object including handler and schema is defined here. The method is called from setupTools at line 224.
    this.server.addTool({
  • Core helper method in DualCycleEngine that implements the monitoring startup logic: initializes state, sets goal, resets counters, ensures semantic analyzer ready, and logs startup.
    async startMonitoring(initialGoal: string, initialBeliefs: string[] = []): Promise<void> { // Ensure semantic analyzer is ready before starting monitoring await this.ensureSemanticAnalyzerReady(); this.isMonitoring = true; this.currentTrace = this.initializeTrace(); this.currentTrace.goal = initialGoal; this.interventionCount = 0; this.accumulatedActions = []; console.log(chalk.blue('🧠 Dual-Cycle Engine: Metacognitive monitoring started')); console.log(chalk.gray(`Goal: ${initialGoal}`)); console.log(chalk.gray(`Initial beliefs: ${initialBeliefs.length}`)); }

Other Tools

Related Tools

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/cyqlelabs/mcp-dual-cycle-reasoner'

If you have feedback or need assistance with the MCP directory API, please join our Discord server