Skip to main content
Glama

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
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • 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' }; }
  • 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) }] };

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/kingdomseed/structured-workflow-mcp'

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