Skip to main content
Glama

getWorkflowModels

Retrieve available workflow models from Adobe Experience Manager to automate content processes and manage business logic.

Instructions

Get all available workflow models

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Core handler function that implements the getWorkflowModels tool by querying AEM's workflow models endpoint, parsing the response into structured model objects including steps, and returning a success response.
    async getWorkflowModels() {
        return safeExecute(async () => {
            try {
                // Get workflow models from AEM
                const response = await this.httpClient.get('/etc/workflow/models.json', {
                    params: { ':depth': '3' }
                });
                const models = [];
                if (response.data && typeof response.data === 'object') {
                    Object.entries(response.data).forEach(([key, value]) => {
                        if (key.startsWith('jcr:') || key.startsWith('sling:'))
                            return;
                        if (value && typeof value === 'object') {
                            const modelPath = `/etc/workflow/models/${key}`;
                            const modelData = value['jcr:content'] || value;
                            models.push({
                                modelId: key,
                                title: modelData['jcr:title'] || key,
                                description: modelData['jcr:description'] || '',
                                version: modelData['version'] || '1.0',
                                status: modelData['status'] || 'enabled',
                                createdBy: modelData['jcr:createdBy'] || 'admin',
                                createdAt: modelData['jcr:created'] || new Date().toISOString(),
                                steps: this.parseModelSteps(modelData)
                            });
                        }
                    });
                }
                return createSuccessResponse({
                    models,
                    totalCount: models.length
                }, 'getWorkflowModels');
            }
            catch (error) {
                throw handleAEMHttpError(error, 'getWorkflowModels');
            }
        }, 'getWorkflowModels');
    }
  • Helper function used by getWorkflowModels to parse steps from a workflow model node structure.
    parseModelSteps(modelData) {
        const steps = [];
        if (modelData && modelData.nodes) {
            Object.entries(modelData.nodes).forEach(([key, value]) => {
                if (key.startsWith('jcr:') || key.startsWith('sling:'))
                    return;
                if (value && typeof value === 'object') {
                    steps.push({
                        name: key,
                        title: value['jcr:title'] || key,
                        type: value['jcr:primaryType'] || 'unknown',
                        description: value['jcr:description']
                    });
                }
            });
        }
        return steps;
    }
  • Tool registration in the MCP server's tools array, including name, description, and input schema (no parameters required).
    {
        name: 'getWorkflowModels',
        description: 'Get all available workflow models',
        inputSchema: { type: 'object', properties: {} },
    },
  • MCP server top-level handler case that delegates to aemConnector.getWorkflowModels() and formats the response for MCP protocol.
    case 'getWorkflowModels': {
        const result = await aemConnector.getWorkflowModels();
        return { content: [{ type: 'text', text: JSON.stringify(result, null, 2) }] };
  • Simplified tool schema definition in MCP handler's available methods list, specifying no parameters.
    { name: 'getWorkflowModels', description: 'Get all available workflow models', parameters: [] },
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. It only states what the tool does ('Get all available workflow models') without mentioning permissions, rate limits, pagination, or response format. 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 a single, efficient sentence with no wasted words. It's front-loaded with the core action and resource, making it easy to parse quickly. Every word earns its place by conveying essential information without redundancy.

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

Completeness3/5

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

Given the tool has 0 parameters, no annotations, and no output schema, the description is minimally adequate but lacks depth. It states the purpose but doesn't cover behavioral aspects like what 'available' means, response format, or error handling. For a simple retrieval tool, it's passable but could be more informative to fully guide the agent.

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

Parameters4/5

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

The input schema has 0 parameters with 100% coverage, so no parameter documentation is needed. The description doesn't add parameter details, which is appropriate here, but it also doesn't compensate for any gaps since there are none. A baseline of 4 is given as it meets expectations for a parameterless tool.

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 verb ('Get') and resource ('all available workflow models'), making the purpose immediately understandable. However, it doesn't differentiate from potential sibling tools like 'listActiveWorkflows' or 'getTemplates', which might also retrieve workflow-related data, so it doesn't achieve full sibling differentiation.

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. With siblings like 'listActiveWorkflows' and 'getTemplates' present, there's no indication of whether this tool retrieves metadata, active instances, templates, or something else, leaving the agent to guess based on 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