Skip to main content
Glama
kingdomseed

Structured Workflow MCP

by kingdomseed

test_workflow

Start a structured workflow to write or improve test coverage. Provide a task description and optionally specify target files, test type, framework, and coverage goals.

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 logic. It receives params (task and optional context) and a sessionManager, then delegates to executeWorkflow with workflowType set to 'test'.
    export async function handleTestWorkflow(
      params: { task: string; context?: any },
      sessionManager: SessionManager
    ) {
      return executeWorkflow(
        {
          task: params.task,
          workflowType: 'test',
          context: params.context
        },
        sessionManager
      );
    }
  • Creates the tool definition object with name 'test_workflow', description, and inputSchema. The schema requires 'task' (string) and optionally accepts 'context' object with targetFiles, testType (unit/integration/e2e/all), testFramework, and coverageGoals.
    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:242-248 (registration)
    The case statement in the main server that routes 'test_workflow' calls to handleTestWorkflow. This is where incoming MCP requests for this tool are dispatched.
    case 'test_workflow':
      return {
        content: [{
          type: 'text',
          text: JSON.stringify(await handleTestWorkflow(args as any, sessionManager), null, 2)
        }]
      };
  • src/index.ts:141-142 (registration)
    Registration of createTestWorkflowTool() in the tools array so the tool definition is listed when clients request the available tools.
    createTestWorkflowTool(),                     // Test writing workflow
    createTddWorkflowTool(),                      // TDD workflow
  • Documentation in the discover_workflow_tools response that describes the test_workflow tool to users, including its purpose, when to use it, and an example invocation.
    {
      name: 'test_workflow',
      purpose: 'Focused workflow for writing or improving tests',
      whenToUse: 'Adding test coverage, writing integration tests, test improvements',
      example: 'test_workflow({ task: "Add unit tests for payment processing" })',
Behavior2/5

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

No annotations are provided, and the description does not disclose any behavioral traits such as side effects, required permissions, or whether the workflow is mutable. It only states the action without detail.

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 conveys the core purpose.

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 nested input schema and lack of output schema, the description is too brief. It doesn't explain what the workflow does, its output, or any side effects, leaving significant gaps.

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 coverage is 100%, so the schema documents parameters adequately. The tool description adds no extra meaning beyond the schema, resulting in a baseline score of 3.

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 starts a workflow for writing or improving test coverage, with a specific verb and resource. However, it doesn't differentiate from similar sibling tools like tdd_workflow or test_guidance, preventing a higher score.

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?

No guidance on when to use this tool versus alternatives. The description implies usage for test coverage tasks but lacks explicit context or exclusions.

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