Skip to main content
Glama

start_workflow

Initiate workflow execution sessions with step-by-step control to manage complex, multi-step processes through structured, reusable task paths.

Instructions

Start a workflow execution session with step-by-step control

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYes
inputsNo

Implementation Reference

  • The main handler function for the 'start_workflow' tool. It validates the input, retrieves the workflow, creates an execution session, and generates instructions for the first step.
    private async startWorkflow(args: unknown) {
      const parsed = StartWorkflowSchema.parse(args);
      
      const workflow = await this.storage.get(parsed.id);
      if (!workflow) {
        throw new Error(`Workflow not found: ${parsed.id}`);
      }
    
      if (workflow.is_deleted) {
        throw new Error('Cannot run deleted workflow');
      }
    
      // Validate inputs
      const inputs = parsed.inputs || {};
      const inputValidation = WorkflowValidator.validateInputs(workflow, inputs);
      if (!inputValidation.success) {
        throw new Error(`Input validation failed: ${inputValidation.error}`);
      }
    
      // Create new execution session
      const executionId = uuidv4();
      const session: WorkflowSession = {
        workflow_id: workflow.id,
        execution_id: executionId,
        workflow_name: workflow.name,
        current_step_index: 0,
        total_steps: workflow.steps.length,
        variables: { ...inputs },
        status: 'active',
        started_at: new Date().toISOString(),
        step_outputs: {},
        previous_variables: {},
      };
    
      this.sessions.set(executionId, session);
    
      // Generate instructions for the first step
      const firstStep = workflow.steps[0];
      const stepInstructions = this.generateStepInstructions(workflow, firstStep, session);
    
      return {
        content: [
          {
            type: 'text',
            text: stepInstructions,
          },
        ],
      };
    }
  • Zod schema defining the input structure for the 'start_workflow' tool: workflow ID and optional inputs.
    const StartWorkflowSchema = z.object({
      id: z.string(),
      inputs: z.record(z.any()).optional(),
    });
  • src/index.ts:277-281 (registration)
    Registration of the 'start_workflow' tool in the getTools() method, including name, description, and input schema.
    {
      name: 'start_workflow',
      description: 'Start a workflow execution session with step-by-step control',
      inputSchema: zodToJsonSchema(StartWorkflowSchema),
    },
  • src/index.ts:132-133 (registration)
    Dispatch registration in the CallToolRequestSchema handler switch statement that routes 'start_workflow' calls to the handler method.
    case 'start_workflow':
      return await this.startWorkflow(args);
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 mentions 'step-by-step control', hinting at interactive or incremental execution, but fails to detail critical aspects such as permissions required, whether it's read-only or destructive, rate limits, session management, or what happens on errors. For a tool that likely involves execution state, this is a significant gap in transparency.

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, efficient sentence that is front-loaded with the core purpose ('Start a workflow execution session') and adds a key feature ('with step-by-step control'). There is no wasted text, and it effectively communicates the essential idea without redundancy or fluff.

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 starting a workflow (likely involving execution, state, and inputs), no annotations, no output schema, and 0% schema coverage, the description is incomplete. It lacks details on behavior, parameters, return values, and error handling, making it inadequate for an agent to use the tool confidently in varied contexts.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the schema provides no parameter details. The description adds no information about the 'id' (e.g., what it refers to, format) or 'inputs' (e.g., expected structure, examples). It doesn't compensate for the lack of schema documentation, leaving both parameters semantically unclear to the agent.

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 ('Start') and resource ('workflow execution session'), specifying it provides 'step-by-step control'. It distinguishes from siblings like 'run_workflow_step' (single step) and 'create_workflow' (creation vs. execution). However, it doesn't explicitly differentiate from all siblings, such as 'rollback_workflow' or 'update_workflow', which keeps it from a perfect 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 explicit guidance on when to use this tool versus alternatives is provided. The description implies usage for starting workflows with control, but it doesn't specify prerequisites (e.g., needing an existing workflow), exclusions (e.g., when not to use it), or direct comparisons to siblings like 'run_workflow_step' or 'list_workflows'. This leaves the agent without clear decision-making criteria.

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/FiveOhhWon/workflows-mcp'

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