workflow_status
Check current workflow progress and session state to monitor structured development phases and verify outputs in disciplined programming practices.
Instructions
Check current workflow progress and session state
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/tools/workflowStatus.ts:16-66 (handler)The core handler function that executes the workflow_status tool logic, retrieving session data, computing metrics, phase outputs, file operations, and generating next step suggestions.export async function handleWorkflowStatus(sessionManager: SessionManager) { const session = sessionManager.getSession(); if (!session) { return { status: 'No active session', message: 'Start a new workflow with plan_workflow tool', hint: 'Example: plan_workflow({ task: "Refactor authentication system" })' }; } const phaseOutputs: Record<string, any> = {}; session.phaseOutputs.forEach((output, phase) => { phaseOutputs[phase] = { completedAt: new Date(output.completedAt).toISOString(), duration: formatDuration(output.duration), output: output.output }; }); const timeElapsed = Date.now() - session.startedAt; return { sessionId: session.id, task: session.taskDescription, startedAt: new Date(session.startedAt).toISOString(), timeElapsed: formatDuration(timeElapsed), currentPhase: session.currentPhase, completedPhases: session.completedPhases, phaseOutputs, metrics: { filesAnalyzed: session.metrics.filesAnalyzed, filesModified: session.metrics.filesModified, lintIssuesFound: session.metrics.lintIssuesFound, lintIssuesFixed: session.metrics.lintIssuesFixed, phasesCompleted: session.completedPhases.length, totalPhases: 9 // Total phases in the workflow }, fileOperations: { totalFilesTracked: session.fileHistory.size, filesRead: Array.from(session.fileHistory.entries()) .filter(([_, history]) => history.hasBeenRead) .map(([file, _]) => file), filesModified: Array.from(session.fileHistory.entries()) .filter(([_, history]) => history.hasBeenModified) .map(([file, _]) => file) }, nextSteps: generateNextStepSuggestions(session.completedPhases, session.currentPhase), reminder: 'This session data is temporary and will be lost when the MCP connection ends' }; }
- src/tools/workflowStatus.ts:5-14 (schema)Defines the tool's metadata including name, description, and input schema (no parameters required).export function createWorkflowStatusTool(): Tool { return { name: 'workflow_status', description: 'Check current workflow progress and session state', inputSchema: { type: 'object', properties: {} } }; }
- src/index.ts:19-19 (registration)Imports the tool creator function and handler from the workflowStatus module.import { createWorkflowStatusTool, handleWorkflowStatus } from './tools/workflowStatus.js';
- src/index.ts:154-154 (registration)Registers the workflow_status tool in the server's tools list for discovery via list_tools.createWorkflowStatusTool(), // Workflow status
- src/index.ts:266-272 (registration)Routes calls to the 'workflow_status' tool to its handler function in the MCP server's request handler.case 'workflow_status': return { content: [{ type: 'text', text: JSON.stringify(await handleWorkflowStatus(sessionManager), null, 2) }] };