Skip to main content
Glama

tdd_workflow

Initiate a Test-Driven Development (TDD) workflow using Red-Green-Refactor cycles to develop features by writing tests first, ensuring implementation aligns with acceptance criteria and specified test frameworks.

Instructions

Start a Test-Driven Development workflow with Red-Green-Refactor cycles

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
contextNoAdditional context (optional)
taskYesDescription of the feature to develop using TDD

Implementation Reference

  • The core handler function for the 'tdd_workflow' tool. It extracts parameters and delegates to the general executeWorkflow with workflowType: 'tdd'.
    export async function handleTddWorkflow( params: { task: string; context?: any }, sessionManager: SessionManager ) { return executeWorkflow( { task: params.task, workflowType: 'tdd', context: params.context }, sessionManager ); }
  • The inputSchema defining the structure and validation for 'tdd_workflow' tool inputs, requiring 'task' and allowing optional 'context'.
    inputSchema: { type: 'object', properties: { task: { type: 'string', description: 'Description of the feature to develop using TDD' }, context: { type: 'object', description: 'Additional context (optional)', properties: { targetFiles: { type: 'array', items: { type: 'string' }, description: 'Files where tests and implementation will be added' }, testFirst: { type: 'boolean', default: true, description: 'Always write the test first (TDD principle)' }, acceptanceCriteria: { type: 'array', items: { type: 'string' }, description: 'Clear acceptance criteria for the feature' }, testFramework: { type: 'string', description: 'Testing framework to use' } } } }, required: ['task'] }
  • src/index.ts:142-142 (registration)
    Registration of the 'tdd_workflow' tool in the server's tools list by calling createTddWorkflowTool().
    createTddWorkflowTool(), // TDD workflow
  • src/index.ts:250-256 (registration)
    Server's request handler switch case that registers and dispatches calls to the 'tdd_workflow' handler function.
    case 'tdd_workflow': return { content: [{ type: 'text', text: JSON.stringify(await handleTddWorkflow(args as any, sessionManager), null, 2) }] };
  • src/index.ts:16-16 (registration)
    Import statement that brings in the tool creator and handler for 'tdd_workflow'.
    import { createTddWorkflowTool, handleTddWorkflow } from './tools/tddWorkflow.js';

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