Skip to main content
Glama
kingdomseed

Structured Workflow MCP

by kingdomseed

workflow_status

Retrieve current workflow progress and session state to track development phase completion within structured programming workflows.

Instructions

Check current workflow progress and session state

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The main handler function that executes the workflow_status tool logic. It retrieves the current session from the SessionManager, checks for active session, formats phase outputs with timestamps/durations, and returns a comprehensive status object including sessionId, task, timing, current phase, completed phases, phase outputs, metrics (files analyzed/modified, lint issues), file operations, next step suggestions, and a reminder about session data being temporary.
    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'
      };
    }
  • The tool schema/definition created by createWorkflowStatusTool(). Defines the tool name 'workflow_status', description 'Check current workflow progress and session state', and an empty 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)
    Import of createWorkflowStatusTool and handleWorkflowStatus from the workflowStatus module.
    import { createWorkflowStatusTool, handleWorkflowStatus } from './tools/workflowStatus.js';
  • src/index.ts:154-154 (registration)
    Registration of the workflow_status tool in the tools array via createWorkflowStatusTool().
    createWorkflowStatusTool(),                   // Workflow status
  • src/index.ts:266-272 (registration)
    The switch-case handler in the CallToolRequestSchema that routes the 'workflow_status' tool name to the handleWorkflowStatus function.
    case 'workflow_status':
      return {
        content: [{
          type: 'text',
          text: JSON.stringify(await handleWorkflowStatus(sessionManager), null, 2)
        }]
      };
Behavior2/5

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

With no annotations provided, the description must fully disclose behavior. It only says 'check', implying read-only, but does not confirm lack of side effects, authentication needs, or what 'session state' entails.

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, front-loaded sentence with no wasted words. It efficiently communicates the tool's purpose.

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?

Given no output schema and no annotations, the description is minimal. It does not explain what kind of progress information is returned, whether it is synchronous, or how it relates to sibling status-checking tools. For a tool with no parameters, it is somewhat complete but lacks helpful context.

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?

The input schema has zero parameters, so schema description coverage is 100%. The description does not need to add parameter meaning. The baseline for 0 params is 4, and the description is adequate.

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

Purpose5/5

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

The description clearly states the action ('check') and the resource ('current workflow progress and session state'). It distinguishes itself from sibling tools like build_custom_workflow and discover_workflow_tools by focusing on status checking.

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, nor does it mention prerequisites or conditions. It simply states what it does without context.

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

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