Skip to main content
Glama

getStatus

Retrieve workflow status by ID to monitor progress and manage content operations in Adobe Experience Manager.

Instructions

Get workflow status by ID

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
workflowIdYes

Implementation Reference

  • Core handler implementation for the getStatus tool. Fetches workflow status from AEM's /etc/workflow/instances/{workflowId}.json endpoint, processes status mapping, step parsing, progress calculation, and returns structured response.
    async getWorkflowStatus(workflowId: string): Promise<WorkflowStatusResponse> {
      return safeExecute<WorkflowStatusResponse>(async () => {
        if (!workflowId) {
          throw createAEMError(
            AEM_ERROR_CODES.INVALID_PARAMETERS, 
            'Workflow ID is required', 
            { workflowId }
          );
        }
    
        try {
          // Get workflow instance details
          const response = await this.httpClient.get(`/etc/workflow/instances/${workflowId}.json`);
          const workflowData = response.data;
    
          // Parse workflow status and steps
          const status = this.mapWorkflowStatus(workflowData.state);
          const steps = this.parseWorkflowSteps(workflowData.history || []);
          const currentStep = this.getCurrentStep(steps);
          const progress = this.calculateProgress(steps);
    
          return createSuccessResponse({
            workflowId,
            status,
            currentStep,
            progress,
            startedBy: workflowData.startedBy || 'admin',
            startedAt: workflowData.startedAt || new Date().toISOString(),
            completedAt: status === 'COMPLETED' ? workflowData.completedAt : undefined,
            steps
          }, 'getWorkflowStatus') as WorkflowStatusResponse;
        } catch (error: any) {
          if (error.response?.status === 404) {
            throw createAEMError(
              AEM_ERROR_CODES.INVALID_PARAMETERS, 
              `Workflow not found: ${workflowId}`, 
              { workflowId }
            );
          }
          throw handleAEMHttpError(error, 'getWorkflowStatus');
        }
      }, 'getWorkflowStatus');
    }
  • MCP server dispatching handler for getStatus tool invocation within CallToolRequestSchema handler.
    case 'getStatus': {
      const result = await aemConnector.getWorkflowStatus(args.workflowId);
      return { content: [{ type: 'text', text: JSON.stringify(result, null, 2) }] };
    }
  • Input schema definition for getStatus tool registration, requiring workflowId parameter.
      name: 'getStatus',
      description: 'Get workflow status by ID',
      inputSchema: {
        type: 'object',
        properties: { workflowId: { type: 'string' } },
        required: ['workflowId'],
      },
    },
  • TypeScript interface defining the output structure of the getStatus tool response.
    export interface WorkflowStatusResponse {
      success: boolean;
      operation: string;
      timestamp: string;
      data: {
        workflowId: string;
        status: 'RUNNING' | 'COMPLETED' | 'SUSPENDED' | 'ABORTED' | 'FAILED';
        currentStep: string;
        progress: number;
        startedBy: string;
        startedAt: string;
        completedAt?: string;
        steps: Array<{
          name: string;
          status: 'PENDING' | 'ACTIVE' | 'COMPLETED' | 'FAILED';
          startedAt?: string;
          completedAt?: string;
          assignee?: string;
          comment?: string;
        }>;
      };
    }
  • Registration of tool list handler that exposes getStatus among other tools via MCP ListToolsRequestSchema.
    server.setRequestHandler(ListToolsRequestSchema, async () => {
      return { tools };
    });
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 implies a read-only operation ('Get'), but doesn't specify if it requires authentication, has rate limits, returns structured data, or handles errors. For a tool with zero annotation coverage, 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 extremely concise with a single, front-loaded sentence that directly states the tool's function. There is no wasted verbiage, making it efficient for quick comprehension, though this brevity contributes to gaps in other dimensions.

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 (a read operation with one parameter), lack of annotations, and no output schema, the description is incomplete. It doesn't explain what 'status' returns, error conditions, or dependencies, leaving the agent with insufficient context for reliable use.

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 description must compensate for the undocumented parameter 'workflowId'. It only mentions 'by ID', adding minimal context (e.g., it's an identifier) without explaining format, source, or constraints. This fails to adequately supplement the bare schema.

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 'Get workflow status by ID' clearly states the verb ('Get') and resource ('workflow status'), making the basic purpose understandable. However, it doesn't specify what 'status' entails (e.g., current state, progress, metadata) or distinguish it from sibling tools like 'listActiveWorkflows' or 'getWorkflowModels', leaving room for ambiguity.

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. It doesn't mention prerequisites (e.g., needing a valid workflow ID), exclusions, or comparisons to siblings like 'listActiveWorkflows' for broader queries or 'getWorkflowModels' for template details, leaving the agent to infer usage from the name alone.

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