Skip to main content
Glama
marco-looy
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) {

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