Skip to main content
Glama
kingdomseed

Structured Workflow MCP

by kingdomseed

test_workflow

Start a focused workflow to write or improve test coverage by specifying tasks, target files, test types, and coverage goals for disciplined programming practices.

Instructions

Start a focused workflow for writing or improving test coverage

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
taskYesDescription of what to test or test coverage to add
contextNoAdditional context (optional)

Implementation Reference

  • The handler function that executes the test_workflow tool logic by calling executeWorkflow with workflowType 'test'.
    export async function handleTestWorkflow(
      params: { task: string; context?: any },
      sessionManager: SessionManager
    ) {
      return executeWorkflow(
        {
          task: params.task,
          workflowType: 'test',
          context: params.context
        },
        sessionManager
      );
    }
  • Tool factory function defining the test_workflow tool, including its name, description, and detailed input schema for parameters like task and context.
    export function createTestWorkflowTool(): Tool {
      return {
        name: 'test_workflow',
        description: 'Start a focused workflow for writing or improving test coverage',
        inputSchema: {
          type: 'object',
          properties: {
            task: {
              type: 'string',
              description: 'Description of what to test or test coverage to add'
            },
            context: {
              type: 'object',
              description: 'Additional context (optional)',
              properties: {
                targetFiles: { 
                  type: 'array', 
                  items: { type: 'string' },
                  description: 'Files that need test coverage'
                },
                testType: { 
                  type: 'string', 
                  enum: ['unit', 'integration', 'e2e', 'all'],
                  description: 'Type of tests to write'
                },
                testFramework: { 
                  type: 'string',
                  description: 'Testing framework being used (e.g., jest, mocha, pytest)'
                },
                coverageGoals: { 
                  type: 'array', 
                  items: { type: 'string' },
                  description: 'Specific coverage goals or scenarios to test'
                }
              }
            }
          },
          required: ['task']
        }
      };
    }
  • src/index.ts:137-157 (registration)
    Registration of the test_workflow tool (via createTestWorkflowTool()) in the main tools array used for ListToolsRequest.
    const tools = [
      // Workflow entry points
      createRefactorWorkflowTool(),                 // Refactoring workflow
      createFeatureWorkflowTool(),                  // Feature creation workflow
      createTestWorkflowTool(),                     // Test writing workflow
      createTddWorkflowTool(),                      // TDD workflow
      createBuildCustomWorkflowTool(),              // Custom workflow builder
      
      // Phase guidance tools
      ...createPhaseGuidanceTools(),                // Handles both suggestive and directive modes
      createTestGuidanceTool(),                     // TEST phase guidance
      
      // Validation tools
      ...createValidationTools(),                   // Both validate_action and validate_phase_completion
      
      // Workflow management
      createUserInputRequiredTool(),                // Escalation handling
      createWorkflowStatusTool(),                   // Workflow status
      createPhaseOutputTool(),                      // Phase output recording
      createDiscoverWorkflowToolsTool()             // Tool discovery
    ];
  • src/index.ts:242-248 (registration)
    In the CallToolRequest handler switch statement, dispatches execution of test_workflow by calling handleTestWorkflow.
    case 'test_workflow':
      return {
        content: [{
          type: 'text',
          text: JSON.stringify(await handleTestWorkflow(args as any, 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