Skip to main content
Glama
marco-looy

Pega DX MCP Server

by marco-looy

get_case_action

Retrieve detailed information about specific case actions in Pega, including available actions and UI metadata, to understand and execute workflow steps.

Instructions

Get detailed information about a case action, including view metadata and available actions

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
caseIDYesCase ID. Example: "MYORG-APP-WORK C-1001". Complete identifier including spaces.
actionIDYesAction ID for case/stage action (Example: "pyUpdateCaseDetails", "pyApproval"). CRITICAL: Action IDs are CASE-SENSITIVE and have no spaces even if display names do ("Edit details" → "pyUpdateCaseDetails"). Use get_case to find correct ID from availableActions array - use "ID" field not "name" field.
viewTypeNoUI resources to return. "none" returns no UI resources, "form" returns only form UI metadata, "page" returns full case page UI metadatapage
excludeAdditionalActionsNoWhen true, excludes information on all actions performable on the case. Set to true if action information was already retrieved in a previous call
sessionCredentialsNoOptional session-specific credentials. If not provided, uses environment variables. Supports two authentication modes: (1) OAuth mode - provide baseUrl, clientId, and clientSecret, or (2) Token mode - provide baseUrl and accessToken.

Implementation Reference

  • The execute method of GetCaseActionTool, which is the main handler for the 'get_case_action' tool. It validates parameters, initializes session if provided, maps viewType, and calls pegaClient.getCaseAction with error handling.
      async execute(params) {
        const { caseID, actionID, viewType, excludeAdditionalActions } = params;
        let sessionInfo = null;
    
        try {
          // Initialize session configuration if provided
          sessionInfo = this.initializeSessionConfig(params);
    
          // Validate required parameters using base class
        const requiredValidation = this.validateRequiredParams(params, ['caseID', 'actionID']);
        if (requiredValidation) {
          return requiredValidation;
        }
    
        // Validate enum parameters using base class
        const enumValidation = this.validateEnumParams(params, {
          viewType: ['none', 'form', 'page']
        });
        if (enumValidation) {
          return enumValidation;
        }
    
        // Validate excludeAdditionalActions if provided
        if (excludeAdditionalActions !== undefined && typeof excludeAdditionalActions !== 'boolean') {
          return {
            error: 'Invalid excludeAdditionalActions parameter. a boolean value.'
          };
        }
    
          // Map viewType 'none' to 'form' since getCaseAction API doesn't accept 'none'
          const apiViewType = viewType === 'none' ? 'form' : viewType;
    
          // Execute with standardized error handling
          return await this.executeWithErrorHandling(
            `Case Action Details: ${actionID} for ${caseID}`,
            async () => await this.pegaClient.getCaseAction(caseID.trim(), actionID.trim(), {
              viewType: apiViewType,
              excludeAdditionalActions
            }),
            { caseID, actionID, viewType, excludeAdditionalActions, sessionInfo }
          );
        } catch (error) {
          return {
            content: [{
              type: 'text',
              text: `## Error: Get Case Action
    
    **Unexpected Error**: ${error.message}
    
    ${sessionInfo ? `**Session**: ${sessionInfo.sessionId} (${sessionInfo.authMode} mode)\n` : ''}*Error occurred at: ${new Date().toISOString()}*`
            }]
          };
        }
      }
  • The static getDefinition() method providing the tool name 'get_case_action', description, and inputSchema for MCP protocol.
    static getDefinition() {
      return {
        name: 'get_case_action',
        description: 'Get detailed information about a case action, including view metadata and available actions',
        inputSchema: {
          type: 'object',
          properties: {
            caseID: {
              type: 'string',
              description: 'Case ID. Example: "MYORG-APP-WORK C-1001". Complete identifier including spaces.'
            },
            actionID: {
              type: 'string',
              description: 'Action ID for case/stage action (Example: "pyUpdateCaseDetails", "pyApproval"). CRITICAL: Action IDs are CASE-SENSITIVE and have no spaces even if display names do ("Edit details" → "pyUpdateCaseDetails"). Use get_case to find correct ID from availableActions array - use "ID" field not "name" field.'
            },
            viewType: {
              type: 'string',
              enum: ['none', 'form', 'page'],
              description: 'UI resources to return. "none" returns no UI resources, "form" returns only form UI metadata, "page" returns full case page UI metadata',
              default: 'page'
            },
            excludeAdditionalActions: {
              type: 'boolean',
              description: 'When true, excludes information on all actions performable on the case. Set to true if action information was already retrieved in a previous call',
              default: false
            },
            sessionCredentials: getSessionCredentialsSchema()
          },
          required: ['caseID', 'actionID']
        }
      };
    }
  • The getCaseAction method in PegaClient class, which delegates to the version-specific client (v1 or v2) and is called by the tool handler.
    async getCaseAction(caseID, actionID, options = {}) {
      return this.client.getCaseAction(caseID, actionID, options);
    }
  • Code in ToolLoader.loadToolFile that dynamically registers the tool instance by name in the loadedTools map after discovering and instantiating GetCaseActionTool.
      const toolInstance = new ToolClass();
      const toolName = ToolClass.getDefinition().name;
      
      this.loadedTools.set(toolName, {
        instance: toolInstance,
        class: ToolClass,
        category: category,
        filename: filename
      });
      
      return toolInstance;
    } catch (error) {
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 states the tool retrieves 'detailed information' but doesn't specify what that includes (e.g., response format, pagination, error handling). It mentions 'view metadata and available actions' but doesn't clarify if this is read-only, requires authentication, or has rate limits. For a tool with 5 parameters and no annotations, this is a significant gap in behavioral context.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that front-loads the core purpose. It avoids redundancy and wastes no words, making it easy to parse. However, it could be slightly more structured by explicitly separating the retrieval of metadata from actions, but this is minor.

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 (5 parameters, nested objects, no output schema, and no annotations), the description is incomplete. It doesn't address behavioral aspects like authentication needs (hinted in the schema but not in the description), response format, or error scenarios. For a tool that likely returns structured data about case actions, the description should provide more context on what 'detailed information' entails, especially without an output schema.

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

Parameters3/5

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

Schema description coverage is 100%, so the schema already documents all parameters thoroughly. The description adds no additional parameter semantics beyond what's in the schema (e.g., it doesn't explain the relationship between 'caseID' and 'actionID' or provide examples of 'viewType' usage). With high schema coverage, the baseline is 3, as the description doesn't compensate with extra insights but also doesn't contradict the schema.

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 tool's purpose: 'Get detailed information about a case action, including view metadata and available actions.' It specifies the verb ('Get') and resource ('case action'), and distinguishes it from siblings like 'get_case' or 'perform_case_action' by focusing on metadata retrieval rather than case data or action execution. However, it doesn't explicitly differentiate from 'get_assignment_action' or 'get_case_type_action', which are similar sibling tools.

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 when to choose it over 'get_case' (which might provide action IDs) or 'perform_case_action' (which executes actions). The input schema hints at usage via parameter descriptions (e.g., using 'get_case' to find action IDs), but the description itself lacks explicit when-to-use or when-not-to-use statements.

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/marco-looy/pega-dx-mcp'

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