Skip to main content
Glama

startWorkflow

Initiate a new workflow instance in Adobe Experience Manager by specifying the workflow model and payload path to automate content processes.

Instructions

Start a new workflow instance

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
modelYes
payloadPathYes
titleNo
commentNo

Implementation Reference

  • Core handler function that executes the startWorkflow tool logic: validates inputs, checks payload existence, starts workflow via AEM API, extracts ID, and returns formatted response.
    async startWorkflow(request) {
        return safeExecute(async () => {
            const { model, payloadPath, title, comment } = request;
            if (!model || !payloadPath) {
                throw createAEMError(AEM_ERROR_CODES.INVALID_PARAMETERS, 'Model and payload path are required', { model, payloadPath });
            }
            // Validate payload path exists
            try {
                await this.httpClient.get(`${payloadPath}.json`);
            }
            catch (error) {
                if (error.response?.status === 404) {
                    throw createAEMError(AEM_ERROR_CODES.INVALID_PARAMETERS, `Payload path not found: ${payloadPath}`, { payloadPath });
                }
                throw handleAEMHttpError(error, 'startWorkflow');
            }
            // Start workflow using AEM's workflow API
            const workflowData = {
                model: model,
                payload: payloadPath,
                title: title || `Workflow for ${payloadPath}`,
                comment: comment || 'Started via AEM MCP Server'
            };
            const response = await this.httpClient.post('/etc/workflow/instances', workflowData, {
                headers: {
                    'Content-Type': 'application/json'
                }
            });
            // Extract workflow ID from response
            const workflowId = this.extractWorkflowId(response.data);
            if (!workflowId) {
                throw createAEMError(AEM_ERROR_CODES.SYSTEM_ERROR, 'Failed to extract workflow ID from response', { response: response.data });
            }
            return createSuccessResponse({
                workflowId,
                model,
                payloadPath,
                title: workflowData.title,
                comment: workflowData.comment,
                status: 'RUNNING',
                createdBy: 'admin', // In real implementation, get from auth context
                createdAt: new Date().toISOString()
            }, 'startWorkflow');
        }, 'startWorkflow');
    }
  • MCP protocol CallTool request handler that dispatches startWorkflow calls to the AEMConnector and formats the response.
    case 'startWorkflow': {
        const result = await aemConnector.startWorkflow(args);
        return { content: [{ type: 'text', text: JSON.stringify(result, null, 2) }] };
    }
  • Tool registration in MCP server including name, description, and input schema definition.
        name: 'startWorkflow',
        description: 'Start a new workflow instance',
        inputSchema: {
            type: 'object',
            properties: {
                model: { type: 'string' },
                payloadPath: { type: 'string' },
                title: { type: 'string' },
                comment: { type: 'string' }
            },
            required: ['model', 'payloadPath'],
        },
    },
  • Alternative/internal handler dispatch for startWorkflow in MCPRequestHandler class.
    case 'startWorkflow':
        return await this.aemConnector.startWorkflow(params);
  • Delegation handler in AEMConnector that forwards startWorkflow to WorkflowOperations module.
    async startWorkflow(request) {
        return this.workflowOps.startWorkflow(request);
    }
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. 'Start a new workflow instance' implies a write operation, but it doesn't reveal whether this requires specific permissions, what happens upon starting (e.g., triggers, side effects), rate limits, or error handling. This is a significant gap for a mutation tool with zero annotation coverage.

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 with no wasted words. It's appropriately sized and front-loaded, making it easy to parse quickly, though this conciseness comes at the cost of detail.

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 (a mutation with 4 parameters), no annotations, no output schema, and 0% schema description coverage, the description is incomplete. It lacks essential details about behavior, parameters, and expected outcomes, making it inadequate for effective tool selection and invocation.

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%, meaning none of the 4 parameters (model, payloadPath, title, comment) are documented in the schema. The description adds no information about these parameters—it doesn't explain what 'model' or 'payloadPath' refer to, their formats, or examples. This fails to compensate for the low coverage, leaving parameters largely unexplained.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose3/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description 'Start a new workflow instance' clearly states the action (start) and resource (workflow instance), which is better than a tautology. However, it doesn't specify what a 'workflow instance' entails or how it differs from sibling tools like 'resumeWorkflow', 'suspendWorkflow', or 'cancelWorkflow', leaving the purpose somewhat vague in context.

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 provides no guidance on when to use this tool versus alternatives. There are multiple sibling tools related to workflows (e.g., 'resumeWorkflow', 'cancelWorkflow', 'listActiveWorkflows'), but the description doesn't indicate prerequisites, timing, or distinctions, offering no usage 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/indrasishbanerjee/aem-mcp-server'

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