Skip to main content
Glama

π“‚€π“’π“‹Ήπ”Έβ„•π•Œπ”Ήπ•€π•Šπ“‹Ήπ“’π“‚€ - Intelligent Guidance for

by Hive-Academy

bootstrap_workflow

Initiate and automate workflow execution for development projects, starting from git setup to task delegation, using guided, automated, or hybrid modes.

Instructions

Initializes a new workflow execution with boomerang role, starting from git setup through task creation and delegation.

Input Schema

NameRequiredDescriptionDefault
executionModeNoWorkflow execution modeGUIDED
initialRoleNoInitial role to start the workflow withboomerang
projectPathNoProject path for context

Input Schema (JSON Schema)

{ "$schema": "http://json-schema.org/draft-07/schema#", "additionalProperties": false, "properties": { "executionMode": { "default": "GUIDED", "description": "Workflow execution mode", "enum": [ "GUIDED", "AUTOMATED", "HYBRID" ], "type": "string" }, "initialRole": { "default": "boomerang", "description": "Initial role to start the workflow with", "enum": [ "boomerang", "researcher", "architect", "senior-developer", "code-review" ], "type": "string" }, "projectPath": { "description": "Project path for context", "type": "string" } }, "type": "object" }

Implementation Reference

  • Primary MCP tool handler for 'bootstrap_workflow'. Decorated with @Tool decorator specifying name, description, and input schema. Handles execution, caching workflow context, error responses, and delegates core bootstrap logic to WorkflowBootstrapService.
    @Tool({ name: 'bootstrap_workflow', description: `Initializes a new workflow execution with product-manager role, starting from git setup through task creation and delegation.`, parameters: BootstrapWorkflowInputSchema as ZodSchema<BootstrapWorkflowInputType>, }) async bootstrapWorkflow(input: BootstrapWorkflowInputType): Promise<any> { try { // Bootstrap the workflow execution const result = await this.bootstrapService.bootstrapWorkflow(input); if (!result.success) { return this.buildErrorResponse(result.message, '', 'ERROR'); } // 🧠 UPDATE WORKFLOW CONTEXT CACHE // Store initial workflow state after successful bootstrap try { const cacheKey = WorkflowContextCacheService.generateKey( result.resources.executionId, 'bootstrap', ); this.workflowContextCache.storeContext(cacheKey, { executionId: result.resources.executionId, taskId: result.resources.taskId || 0, // Bootstrap may not have taskId yet currentRoleId: result.currentRole.id, currentStepId: result.currentStep.id, roleName: result.currentRole.name, stepName: result.currentStep.name, taskName: 'Bootstrap Workflow', projectPath: input.projectPath || process.cwd(), source: 'bootstrap', }); } catch (_cacheError) { // Don't fail bootstrap if cache update fails } // Return streamlined response with essential data only // Remove duplication of currentRole and currentStep (they're in resources) return this.buildResponse({ success: true, message: result.message, executionId: result.resources.executionId, taskId: result.resources.taskId, currentRole: { id: result.currentRole.id, name: result.currentRole.name, description: result.currentRole.description, capabilities: result.currentRole.capabilities, coreResponsibilities: result.currentRole.coreResponsibilities, keyCapabilities: result.currentRole.keyCapabilities, }, currentStep: { id: result.currentStep.id, name: result.currentStep.name, description: result.currentStep.description, }, timestamp: new Date().toISOString(), }); } catch (error: any) { return this.buildErrorResponse( error.message, 'Bootstrap workflow failed', 'BOOTSTRAP_ERROR', ); } } }
  • Zod schema defining input parameters for the bootstrap_workflow tool: initialRole (enum with default), executionMode (enum with default), and optional projectPath.
    const BootstrapWorkflowInputSchema = z.object({ initialRole: z .enum(['product-manager', 'architect', 'senior-developer', 'code-review']) .default('product-manager') .describe('Initial role to start the workflow with'), executionMode: z .enum(['GUIDED', 'AUTOMATED', 'HYBRID']) .default('GUIDED') .describe('Workflow execution mode'), projectPath: z.string().optional().describe('Project path for context'), });
  • Helper service implementing the core bootstrapWorkflow logic. Calls the repository, handles errors, and formats the response with execution details for the MCP handler.
    async bootstrapWorkflow(input: BootstrapWorkflowInput): Promise<any> { const result = await this.bootstrapRepository.bootstrapWorkflow(input); if (!result.success || !result.data) { return { success: false, message: `Bootstrap failed: ${result.error || 'Unknown error'}`, resources: { taskId: null, executionId: '', firstStepId: null, }, execution: null, currentStep: null, currentRole: null, }; } // Return execution data for immediate workflow start return { success: true, message: `Workflow execution started successfully. Begin with: ${result.data.firstStep.description}`, resources: { taskId: null, // Will be created by workflow executionId: result.data.workflowExecution.id, firstStepId: result.data.firstStep.id, }, task: result.data.workflowExecution.task, currentStep: result.data.firstStep, currentRole: result.data.role, }; }
  • Repository layer method for persisting and initializing workflow bootstrap data. Currently a placeholder implementation.
    /** * Bootstrap a complete workflow execution with role and step setup * @param input - Bootstrap workflow input data * @param tx - Optional transaction client * @returns Promise<BootstrapResult> */ async bootstrapWorkflow(

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/Hive-Academy/Anubis-MCP'

If you have feedback or need assistance with the MCP directory API, please join our Discord server