Skip to main content
Glama
marco-looy

Pega DX MCP Server

by marco-looy

get_case_descendants

Retrieve all child cases, assignments, and actions from a specific case instance by recursively descending through its hierarchy to analyze case relationships and dependencies.

Instructions

Get descendants of a case instance. This API loops through all the child cases recursively descending from the specific one, and returns the assignments and actions for each. If the current user does not have access to a given child case, they can only see limited information, and can not drill down into any child cases.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
caseIDYesCase ID. Example: "MYORG-APP-WORK C-1001". Complete identifier including spaces."OSIEO3-DOCSAPP-WORK T-561003". a complete case identifier including spaces and special characters. The case must exist and be accessible to the current user.
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 implements the core logic of the get_case_descendants tool, handling input validation, session initialization, and delegation to PegaClient.getCaseDescendants with standardized error handling.
    async execute(params) {
      const { caseID } = 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']);
        if (requiredValidation) {
          return requiredValidation;
        }
    
        // Execute with standardized error handling
        return await this.executeWithErrorHandling(
          `Case Descendants: ${caseID}`,
          async () => await this.pegaClient.getCaseDescendants(caseID.trim()),
          { caseID, sessionInfo }
        );
      } catch (error) {
        return {
          content: [{
            type: 'text',
            text: `## Error: Get Case Descendants\n\n**Unexpected Error**: ${error.message}\n\n${sessionInfo ? `**Session**: ${sessionInfo.sessionId} (${sessionInfo.authMode} mode)\n` : ''}*Error occurred at: ${new Date().toISOString()}*`
          }]
        };
      }
    }
  • Defines the tool schema including name 'get_case_descendants', detailed description, and input schema requiring 'caseID' with optional session credentials.
    static getDefinition() {
      return {
        name: 'get_case_descendants',
        description: 'Get descendants of a case instance. This API loops through all the child cases recursively descending from the specific one, and returns the assignments and actions for each. If the current user does not have access to a given child case, they can only see limited information, and can not drill down into any child cases.',
        inputSchema: {
          type: 'object',
          properties: {
            caseID: {
              type: 'string',
              description: 'Case ID. Example: "MYORG-APP-WORK C-1001". Complete identifier including spaces."OSIEO3-DOCSAPP-WORK T-561003". a complete case identifier including spaces and special characters. The case must exist and be accessible to the current user.'
            },
            sessionCredentials: getSessionCredentialsSchema()
          },
          required: ['caseID']
        }
      };
    }
  • PegaClient helper method that routes getCaseDescendants to the appropriate V1 or V2 API client implementation.
     * Get case descendants
     * @param {string} caseID - Case ID
     * @returns {Promise<Object>} Descendant cases
     */
    async getCaseDescendants(caseID) {
      return this.client.getCaseDescendants(caseID);
    }
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries full burden and does well: it discloses the recursive traversal behavior ('loops through all the child cases recursively'), the return content ('assignments and actions for each'), and important access control behavior ('If the current user does not have access... limited information... can not drill down'). It doesn't mention pagination, rate limits, or performance implications of deep recursion, but covers core behavioral aspects adequately.

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 appropriately sized (three sentences) and front-loaded with the core purpose. Each sentence adds value: first states the action, second explains the recursive behavior and return values, third covers access restrictions. No wasted words, though the third sentence could be slightly more concise.

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

Completeness4/5

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

For a tool with no annotations and no output schema, the description provides good coverage: it explains the recursive traversal behavior, what information is returned, and access restrictions. It doesn't describe the output format structure or potential performance considerations for deep case hierarchies, but given the context (100% schema coverage, no output schema), it's reasonably complete for agent usage.

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 fully documents both parameters. The description doesn't add any parameter-specific information beyond what's in the schema descriptions. It mentions the caseID must be 'accessible to the current user' which is already in the schema, and doesn't provide additional context about sessionCredentials usage. Baseline 3 is appropriate when schema does the heavy lifting.

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 descendants of a case instance' with details about recursive traversal and what information is returned (assignments and actions). It distinguishes from siblings like get_case_ancestors (which goes upward) and get_case (which gets a single case). However, it doesn't explicitly contrast with get_related_cases or other case hierarchy tools.

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

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage context: when you need to explore all child cases recursively from a specific case. It mentions access restrictions ('If the current user does not have access...'), which provides some guidance on when results might be limited. However, it doesn't explicitly state when to use this versus alternatives like get_related_cases or manual traversal of individual cases.

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