Skip to main content
Glama
kingdomseed

Structured Workflow MCP

by kingdomseed

create_feature_workflow

Start a structured workflow for adding new features with integrated testing, guided by requirements and acceptance criteria.

Instructions

Start a structured workflow for adding new functionality with integrated testing

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
taskYesDescription of the feature to create
contextNoAdditional context (optional)

Implementation Reference

  • The handler function that executes the create_feature_workflow tool logic. It delegates to executeWorkflow with workflowType: 'feature'.
    export async function handleCreateFeatureWorkflow(
      params: { task: string; context?: any },
      sessionManager: SessionManager
    ) {
      return executeWorkflow(
        {
          task: params.task,
          workflowType: 'feature',
          context: params.context
        },
        sessionManager
      );
    }
  • The core executeWorkflow function called by the handler. It gets the 'feature' preset from WorkflowPresets, starts a session, builds phase details, and returns the full workflow plan.
    export async function executeWorkflow(
      params: WorkflowExecutionParams,
      sessionManager: SessionManager
    ) {
      // Get workflow preset
      const preset = getWorkflowPreset(params.workflowType);
      
      // Use custom phases if provided, otherwise use preset
      const phases = params.customPhases || preset.phases;
      
      // Merge custom iteration limits with preset
      const iterationLimits = {
        ...preset.iterationLimits,
        ...params.customIterationLimits
      };
      
      // Start a new session with workflow type
      const session = sessionManager.startSession(params.task, undefined, params.workflowType);
      
      // Build phase details based on workflow type
      const phaseDetails = buildPhaseDetails(phases, params.workflowType);
      
      return {
        sessionId: session.id,
        task: params.task,
        workflowType: params.workflowType,
        workflowName: preset.name,
        context: params.context || {},
        startedAt: new Date(session.startedAt).toISOString(),
        workflowOverview: {
          totalPhases: phases.length,
          estimatedTotalTime: preset.estimatedDuration,
          philosophy: preset.philosophy,
          corePhilosophy: 'Guide, Don\'t Gate - All your tools remain available throughout the workflow'
        },
        phases: phaseDetails,
        keyBenefits: preset.keyBenefits,
        iterationLimits,
        criticalGuidance: getCriticalGuidance(params.workflowType),
        howToBegin: getHowToBegin(phases[0], params.workflowType),
        availableTools: {
          workflowTools: getWorkflowTools(phases),
          yourTools: 'All your standard tools for file operations, searching, editing, terminal commands, etc. remain fully available'
        },
        reminder: `This is the ${preset.name} - optimized for ${preset.description.toLowerCase()}`
      };
    }
  • The tool definition function that creates the schema/input validation for 'create_feature_workflow'. Defines required 'task' string and optional 'context' object with targetFiles, scope, and requirements.
    export function createFeatureWorkflowTool(): Tool {
      return {
        name: 'create_feature_workflow',
        description: 'Start a structured workflow for adding new functionality with integrated testing',
        inputSchema: {
          type: 'object',
          properties: {
            task: {
              type: 'string',
              description: 'Description of the feature to create'
            },
            context: {
              type: 'object',
              description: 'Additional context (optional)',
              properties: {
                targetFiles: { 
                  type: 'array', 
                  items: { type: 'string' },
                  description: 'Files where the feature will be added'
                },
                scope: { 
                  type: 'string', 
                  enum: ['file', 'directory', 'project'],
                  description: 'The scope of the feature'
                },
                requirements: { 
                  type: 'array', 
                  items: { type: 'string' },
                  description: 'Feature requirements and acceptance criteria'
                }
              }
            }
          },
          required: ['task']
        }
      };
  • src/index.ts:140-140 (registration)
    Registration of the tool in the server's tools array (line 140). Also the switch-case handler that routes 'create_feature_workflow' calls to handleCreateFeatureWorkflow (lines 234-239).
    createFeatureWorkflowTool(),                  // Feature creation workflow
  • The 'feature' workflow preset definition used when create_feature_workflow is invoked. Defines phases (SETUP, PLANNING, QUESTION_DETERMINE, WRITE_OR_REFACTOR, TEST, LINT, ITERATE, PRESENT), iteration limits, and philosophy.
    feature: {
      name: 'Feature Creation Workflow',
      description: 'Structured approach to adding new functionality with testing',
      type: 'feature',
      phases: [
        'SETUP',
        'PLANNING',
        'QUESTION_DETERMINE',
        'WRITE_OR_REFACTOR',
        'TEST',
        'LINT',
        'ITERATE',
        'PRESENT'
      ],
      iterationLimits: {
        TEST: 10,  // More test iterations for new features
        LINT: 10,
        ITERATE: 15
      },
      estimatedDuration: '60-90 minutes',
      philosophy: 'Plan thoroughly, implement cleanly, test completely',
      keyBenefits: [
        'Clear planning before implementation',
        'Integrated testing for new functionality',
        'Quality assurance built-in'
      ],
      when_to_use: [
        'Adding new functionality',
        'Implementing new API endpoints',
        'Creating new UI components',
        'Building new modules or services'
      ]
    },
Behavior2/5

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

No annotations provided. The description mentions 'structured workflow' and 'integrated testing' but does not disclose what actions are taken, such as file creation, test execution, or user prompts. The agent has little insight into side effects or required permissions.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Single sentence is concise and front-loaded with the key action. However, it could benefit from a second sentence to clarify scope or output.

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 of a workflow tool with nested parameters and no output schema, the description is too brief. It lacks details on workflow steps, return value, or integration with sibling tools. Incomplete for effective use.

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?

Input schema covers 100% of parameters with descriptions. The description adds no additional meaning beyond the schema, which already explains 'task' and 'context' with sub-properties. Baseline score of 3 is appropriate.

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 verb 'Start' and resource 'structured workflow for adding new functionality with integrated testing'. It distinguishes from siblings like tdd_workflow and test_workflow by emphasizing integrated testing, but could be more specific about the unique workflow.

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. No prerequisites or conditions provided. The user must infer from 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