start_contemplation
Initiate continuous background cognitive processing to maintain thoughts, recognize patterns, and develop insights between conversations.
Instructions
Start the background contemplation loop
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/index.ts:112-156 (handler)Core implementation in ContemplationManager.start(): spawns the Python contemplation subprocess, sets up stdout listener to capture insights, and handles errors.async start(): Promise<string> { if (this.subprocess) { return 'Contemplation loop already running'; } try { this.subprocess = spawn('python3', [this.contemplationPath], { cwd: path.dirname(this.contemplationPath), stdio: ['pipe', 'pipe', 'pipe'], detached: false }); this.subprocess.stdout?.on('data', (data) => { try { const lines = data.toString().split('\n').filter((line: string) => line.trim()); for (const line of lines) { const response = JSON.parse(line); if (response.has_insight) { this.insights.push({ id: response.thought_id, thought_type: response.thought_type, content: response.insight, significance: response.significance || 5, timestamp: new Date().toISOString(), used: false }); } } } catch (e) { // Not JSON, ignore } }); this.subprocess.on('error', (err) => { console.error('Contemplation process error:', err); }); // Give it a moment to start await new Promise(resolve => setTimeout(resolve, 1000)); return 'Contemplation loop started successfully'; } catch (error) { throw new Error(`Failed to start contemplation: ${error}`); } }
- src/index.ts:498-503 (handler)MCP CallToolRequestSchema handler case: delegates to ContemplationManager.start() and returns the result as text content.case 'start_contemplation': { const result = await contemplation.start(); return { content: [{ type: 'text', text: result }], }; }
- src/index.ts:376-383 (registration)Registers the tool in ListToolsRequestSchema response: defines name, description, and input schema.{ name: 'start_contemplation', description: 'Start the background contemplation loop', inputSchema: { type: 'object', properties: {}, }, },
- src/index.ts:379-382 (schema)Input schema definition: empty object since no parameters are required.inputSchema: { type: 'object', properties: {}, },