Skip to main content
Glama

completeWorkflowStep

Complete a specific workflow step in Adobe Experience Manager by providing workflow ID, step name, and optional comment to advance content approval processes.

Instructions

Complete a workflow step

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
workflowIdYes
stepNameYes
commentNo

Implementation Reference

  • Primary MCP tool handler implementation for 'completeWorkflowStep'. Extracts parameters from tool call arguments and delegates execution to the AEMConnector instance.
    case 'completeWorkflowStep': {
        const { workflowId, stepName, comment } = args;
        const result = await aemConnector.completeWorkflowStep(workflowId, stepName, comment);
        return { content: [{ type: 'text', text: JSON.stringify(result, null, 2) }] };
    }
  • Tool schema definition including name, description, and input schema validation for 'completeWorkflowStep', used for registration and listTools response.
    {
        name: 'completeWorkflowStep',
        description: 'Complete a workflow step',
        inputSchema: {
            type: 'object',
            properties: {
                workflowId: { type: 'string' },
                stepName: { type: 'string' },
                comment: { type: 'string' }
            },
            required: ['workflowId', 'stepName'],
        },
    },
  • Core business logic handler for completing a workflow step. Makes authenticated HTTP POST request to AEM's workflow API endpoint and wraps response.
    async completeWorkflowStep(workflowId, stepName, comment) {
        return safeExecute(async () => {
            if (!workflowId || !stepName) {
                throw createAEMError(AEM_ERROR_CODES.INVALID_PARAMETERS, 'Workflow ID and step name are required', { workflowId, stepName });
            }
            // Complete the workflow step
            const stepData = {
                action: 'complete',
                comment: comment || `Step ${stepName} completed via AEM MCP Server`
            };
            const response = await this.httpClient.post(`/etc/workflow/instances/${workflowId}/steps/${stepName}`, stepData, {
                headers: {
                    'Content-Type': 'application/json'
                }
            });
            return createSuccessResponse({
                workflowId,
                stepName,
                comment: stepData.comment,
                status: 'COMPLETED',
                completedAt: new Date().toISOString()
            }, 'completeWorkflowStep');
        }, 'completeWorkflowStep');
  • Delegation method in AEMConnector class that forwards the call to the WorkflowOperations module.
    async completeWorkflowStep(workflowId, stepName, comment) {
        return this.workflowOps.completeWorkflowStep(workflowId, stepName, comment);
  • Alternative handler implementation in MCPRequestHandler class (potentially unused), delegates to AEMConnector.
    case 'completeWorkflowStep':
        return await this.aemConnector.completeWorkflowStep(params.workflowId, params.stepName, params.comment);
Behavior1/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. It states 'Complete a workflow step' but does not explain what 'complete' entails—e.g., whether it marks a step as done, triggers transitions, requires permissions, or has side effects. This leaves critical behavioral traits like mutability, authorization needs, or error conditions unspecified.

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 extremely concise with a single sentence, 'Complete a workflow step', which is front-loaded and wastes no words. However, this brevity comes at the cost of under-specification, but based solely on conciseness criteria, it earns a high score for efficiency.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness1/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity (involving workflow management), lack of annotations, 0% schema description coverage, and no output schema, the description is completely inadequate. It fails to explain what the tool does, how to use it, what parameters mean, or what to expect, leaving the agent with insufficient information for correct invocation.

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

Parameters1/5

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

The description adds no meaning beyond the input schema, which has 0% description coverage. Parameters 'workflowId', 'stepName', and 'comment' are undocumented in both schema and description, with no explanation of their formats, constraints, or purposes. For a tool with 3 parameters and no schema descriptions, this is inadequate.

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

Purpose2/5

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

The description 'Complete a workflow step' is a tautology that essentially restates the tool name 'completeWorkflowStep' without adding meaningful specificity. It mentions the verb 'complete' and resource 'workflow step' but fails to distinguish this tool from sibling workflow tools like 'cancelWorkflow', 'resumeWorkflow', 'suspendWorkflow', or 'startWorkflow', leaving the exact purpose unclear.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines1/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. It does not mention prerequisites, context, or exclusions, such as whether it applies only to active workflows or specific step states. With sibling tools like 'cancelWorkflow' and 'resumeWorkflow', the lack of differentiation makes it misleading for an agent to select the correct tool.

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