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)
        }]
      };
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It mentions starting a workflow but doesn't explain what that entails—e.g., whether it's interactive, requires user input, has side effects, or returns specific outputs. For a tool with potential complexity (given nested parameters), this lack of detail is a significant gap, leaving the agent uncertain about execution behavior.

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, efficient sentence: 'Start a focused workflow for writing or improving test coverage.' It is front-loaded with the core action and purpose, with zero wasted words or redundancy. Every part of the sentence contributes directly to understanding the tool's intent.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the complexity (nested parameters, no annotations, no output schema), the description is incomplete. It doesn't address behavioral aspects like workflow steps, expected outputs, or error handling. While the schema covers parameters, the lack of annotations and output details means the description should provide more context to guide effective tool use, but it falls short.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema already documents both parameters ('task' and 'context') and their nested properties. The description adds no additional meaning beyond the schema, such as examples or usage tips for parameters. This meets the baseline of 3, as the schema handles the heavy lifting, but the description doesn't compensate or enhance understanding.

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

Purpose4/5

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

The description clearly states the tool's purpose: 'Start a focused workflow for writing or improving test coverage.' It specifies the verb ('Start') and resource ('focused workflow'), and the action is distinct from siblings like 'test_guidance' or 'tdd_workflow' which imply different scopes. However, it doesn't explicitly differentiate from all siblings, such as 'create_feature_workflow' or 'refactor_workflow', which might involve similar workflow initiation.

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. It lacks explicit context, exclusions, or references to sibling tools like 'test_guidance' or 'tdd_workflow', which could be related. Without such information, users must infer usage based on the name alone, leading to potential confusion in tool selection.

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