Skip to main content
Glama
Hive-Academy

π“‚€π“’π“‹Ήπ”Έβ„•π•Œπ”Ήπ•€π•Šπ“‹Ήπ“’π“‚€ - 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

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

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(
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It states the tool 'initializes' a workflow, implying a creation/mutation operation, but doesn't disclose whether this is idempotent, what permissions are required, what happens on failure, or what the expected output looks like. The mention of 'git setup' and 'task creation' adds some context but lacks operational details.

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?

The description is a single, efficient sentence that front-loads the core purpose. However, it could be more structured by separating the initialization action from the procedural details ('starting from...'), and 'boomerang role' is unexplained jargon that reduces clarity.

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?

For a tool that initializes workflows with no annotations and no output schema, the description is insufficient. It lacks details on what 'initializes' entails operationally, what 'boomerang role' means, how errors are handled, or what the agent should expect after invocation. The context signals indicate moderate complexity (3 parameters, enums), but the description doesn't adequately address this.

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%, providing clear documentation for all three parameters. The description adds no additional parameter semantics beyond what's in the schemaβ€”it doesn't explain how 'projectPath' relates to 'git setup' or clarify the implications of 'executionMode' choices. With high schema coverage, the 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 action ('Initializes a new workflow execution') and specifies the starting role ('boomerang role'), which distinguishes it from tools like 'init_rules' or 'execute_transition'. However, it doesn't explicitly differentiate from 'workflow_execution_operations' or explain what 'boomerang role' entails beyond being the starting point.

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 mentions 'starting from git setup through task creation and delegation', which implies a specific context, but provides no explicit guidance on when to use this tool versus alternatives like 'init_rules' or 'execute_transition'. There's no mention of prerequisites, when-not-to-use scenarios, or comparisons to sibling tools.

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

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

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