status
Check ChurnFlow system status and tracker information to monitor productivity system operations and task routing.
Instructions
Get ChurnFlow system status and tracker information
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/index.ts:205-251 (handler)MCP tool handler function that fetches system status from CaptureEngine and formats a readable report with initialization check and error handling.async function handleStatus(): Promise<CallToolResult> { try { await initializeCaptureEngine(); if (!captureEngine) { throw new Error('Failed to initialize capture engine'); } const status = await captureEngine.getStatus(); const statusLines = [ 'π ChurnFlow System Status', '', `π’ Initialized: ${status.initialized}`, `π Total Trackers: ${status.totalTrackers}`, `βοΈ AI Provider: ${status.aiProvider}`, `π― Confidence Threshold: ${status.confidenceThreshold}`, `π Collections Path: ${status.collectionsPath}`, '', 'π Trackers by Context:', ]; Object.entries(status.trackersByContext || {}).forEach(([context, count]) => { statusLines.push(` ${context}: ${count}`); }); return { content: [ { type: 'text', text: statusLines.join('\n'), }, ], isError: false, }; } catch (error) { return { content: [ { type: 'text', text: `Error getting status: ${error instanceof Error ? error.message : String(error)}`, }, ], isError: true, }; } }
- src/index.ts:60-67 (schema)Tool definition including name, description, and input schema (no parameters required). Used for both tool listing and validation.{ name: 'status', description: 'Get ChurnFlow system status and tracker information', inputSchema: { type: 'object', properties: {}, }, },
- src/index.ts:334-350 (registration)MCP server request handler for CallToolRequestSchema that registers and dispatches the 'status' tool call to its handler function.server.setRequestHandler(CallToolRequestSchema, async (request) => { const { name, arguments: args } = request.params; switch (name) { case 'capture': return await handleCapture(args); case 'status': return await handleStatus(); case 'list_trackers': return await handleListTrackers(args); default: throw new Error(`Unknown tool: ${name}`); } });
- src/index.ts:329-331 (registration)MCP server request handler for ListToolsRequestSchema that registers the 'status' tool in the available tools list.server.setRequestHandler(ListToolsRequestSchema, async () => { return { tools: TOOLS }; });
- src/core/CaptureEngine.ts:473-493 (helper)Helper method in CaptureEngine that computes and returns the core system status data (initialized state, tracker counts by context, config info) used by the status tool.getStatus(): Record<string, any> { const trackers = this.trackerManager.getTrackersByContext(); return { initialized: this.initialized, totalTrackers: trackers.length, trackersByContext: trackers.reduce( (acc, tracker) => { const type = tracker.frontmatter.contextType; acc[type] = (acc[type] || 0) + 1; return acc; }, {} as Record<string, number>, ), config: { collectionsPath: this.config.collectionsPath, aiProvider: this.config.aiProvider, confidenceThreshold: this.config.confidenceThreshold, }, }; }