Skip to main content
Glama
cyqlelabs

MCP Dual-Cycle Reasoner

by cyqlelabs

reset_engine

DestructiveIdempotent

Reset the dual-cycle engine state in the MCP Dual-Cycle Reasoner to resolve reasoning loops and restore optimal performance for AI agents.

Instructions

Reset the dual-cycle engine state

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • MCP tool handler for reset_engine: retrieves session engine and calls its reset() method, with logging and error handling.
    execute: async (args, { log, session }) => {
      try {
        const sessionEngine = this.getSessionEngine(session);
        const sessionId = this.sessionIds.get(session);
    
        log.warn('Resetting dual-cycle engine state', { sessionId });
    
        sessionEngine.reset();
    
        log.info('Engine reset completed successfully');
    
        return '🔄 Dual-Cycle Engine has been reset';
      } catch (error) {
        const errorMessage = error instanceof Error ? error.message : String(error);
        log.error('Failed to reset engine', { error: errorMessage });
        throw new UserError(`Failed to reset engine: ${errorMessage}`);
      }
    },
  • src/server.ts:629-660 (registration)
    Registers the reset_engine tool with the FastMCP server, including schema (empty params), annotations, and handler reference. Called from setupTools() at line 231.
    private addResetEngineTool(): void {
      this.server.addTool({
        name: 'reset_engine',
        description: 'Reset the dual-cycle engine state',
        parameters: z.object({}),
        annotations: {
          title: 'Reset Engine State',
          readOnlyHint: false,
          destructiveHint: true,
          idempotentHint: true,
          openWorldHint: false,
        },
        execute: async (args, { log, session }) => {
          try {
            const sessionEngine = this.getSessionEngine(session);
            const sessionId = this.sessionIds.get(session);
    
            log.warn('Resetting dual-cycle engine state', { sessionId });
    
            sessionEngine.reset();
    
            log.info('Engine reset completed successfully');
    
            return '🔄 Dual-Cycle Engine has been reset';
          } catch (error) {
            const errorMessage = error instanceof Error ? error.message : String(error);
            log.error('Failed to reset engine', { error: errorMessage });
            throw new UserError(`Failed to reset engine: ${errorMessage}`);
          }
        },
      });
    }
  • Core reset logic in DualCycleEngine: resets sentinel, reinitializes trace, stops monitoring, clears counters and action history.
    reset(): void {
      this.sentinel.reset();
      this.currentTrace = this.initializeTrace();
      this.isMonitoring = false;
      this.interventionCount = 0;
      this.accumulatedActions = [];
      console.log(chalk.blue('🔄 Dual-Cycle Engine reset'));
    }
  • Input schema for reset_engine tool: empty object (no parameters required).
    parameters: z.object({}),
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already provide significant behavioral information (destructiveHint: true, idempotentHint: true, readOnlyHint: false). The description adds value by specifying 'dual-cycle engine state' as the target, which gives context about what gets reset. However, it doesn't elaborate on consequences like data loss or system downtime that would be helpful given the destructive nature.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence with zero wasted words. It's appropriately sized for a parameterless tool and immediately communicates the core action without unnecessary elaboration.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a destructive tool with no output schema, the description provides basic purpose but lacks important context about what 'reset' entails operationally. Annotations cover safety aspects, but the description could better explain the reset's scope, timing, or system impact given the tool's complexity.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

With 0 parameters and 100% schema description coverage, the baseline is 4. The description appropriately doesn't discuss parameters since none exist, and it focuses on the tool's purpose instead.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('Reset') and the target ('dual-cycle engine state'), providing a specific verb+resource combination. However, it doesn't differentiate this tool from sibling tools like 'stop_monitoring' or 'configure_detection' that might also affect engine state, so it doesn't reach the highest score.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives like 'stop_monitoring' or 'configure_detection'. It doesn't mention prerequisites, timing considerations, or when-not-to-use scenarios, leaving the agent with minimal contextual direction.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

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