Skip to main content
Glama
marco-looy

Pega DX MCP Server

by marco-looy

delete_participant

Remove a participant from a Pega case using case ID and participant ID. Automatically fetches the latest eTag if not provided to ensure data consistency through optimistic locking.

Instructions

Delete a participant from a Pega case by case ID and participant ID. If no eTag is provided, automatically fetches the latest eTag from the case for seamless operation. Requires an eTag value for optimistic locking to ensure data consistency. Returns success confirmation or detailed error information.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
caseIDYesCase ID. Example: "MYORG-APP-WORK C-1001". Complete identifier including spaces."ON6E5R-DIYRecipe-Work-RecipeCollection R-1008". a complete case identifier including spaces and special characters.
participantIDYesParticipant ID to remove from the case. This identifies the specific participant that will be deleted from the case participant list.
eTagNoOptional. Auto-fetched if omitted. For faster execution, use eTag from previous response.
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 async execute(params) method in DeleteParticipantTool class implements the core handler logic for the 'delete_participant' tool. It handles input validation, automatic eTag fetching if not provided, eTag validation, and delegates the deletion to pegaClient.deleteParticipant within standardized error handling.
      async execute(params) {
        const { caseID, participantID, eTag } = params;
        let sessionInfo = null;
    
        try {
          sessionInfo = this.initializeSessionConfig(params);
    
        // Validate required parameters using base class
        const requiredValidation = this.validateRequiredParams(params, ['caseID', 'participantID']);
        if (requiredValidation) {
          return requiredValidation;
        }
    
        // Execute with standardized error handling
    // Auto-fetch eTag if not provided
        let finalETag = eTag;
        let autoFetchedETag = false;
        
        if (!finalETag) {
          try {
            console.log(`Auto-fetching latest eTag for participant operation on ${caseID}...`);
            const caseResponse = await this.pegaClient.getCase(caseID.trim());
            
            if (!caseResponse || !caseResponse.success) {
              const errorMsg = `Failed to auto-fetch eTag: ${caseResponse?.error?.message || 'Unknown error'}`;
              return {
                error: errorMsg
              };
            }
            
            finalETag = caseResponse.eTag;
            autoFetchedETag = true;
            console.log(`Successfully auto-fetched eTag: ${finalETag}`);
            
            if (!finalETag) {
              const errorMsg = 'Auto-fetch succeeded but no eTag was returned from get_case. This may indicate a server issue.';
              return {
                error: errorMsg
              };
            }
          } catch (error) {
            const errorMsg = `Failed to auto-fetch eTag: ${error.message}`;
            return {
              error: errorMsg
            };
          }
        }
        
        // Validate eTag format (should be a timestamp-like string)
        if (typeof finalETag !== 'string' || finalETag.trim().length === 0) {
          return {
            error: 'Invalid eTag parameter. a non-empty string representing case save date time.'
          };
        }
    
          return await this.executeWithErrorHandling(
            `Delete Participant: ${caseID.trim()} / ${participantID.trim()}`,
            async () => await this.pegaClient.deleteParticipant(caseID.trim(), participantID.trim(), finalETag.trim()),
            { caseID: caseID.trim(), participantID: participantID.trim(), eTag: '***', sessionInfo } // Hide eTag in logs for security
          );
        } catch (error) {
          return {
            content: [{
              type: 'text',
              text: `## Error: Delete Participant: ${caseID} / ${participantID}\n\n**Unexpected Error**: ${error.message}\n\n${sessionInfo ? `**Session**: ${sessionInfo.sessionId} (${sessionInfo.authMode} mode)\n` : ''}*Error occurred at: ${new Date().toISOString()}*`
            }]
          };
        }
      }
  • The static getDefinition() method defines the tool's metadata including name 'delete_participant', description, and inputSchema for validation in the MCP protocol.
    static getDefinition() {
      return {
        name: 'delete_participant',
        description: 'Delete a participant from a Pega case by case ID and participant ID. If no eTag is provided, automatically fetches the latest eTag from the case for seamless operation. Requires an eTag value for optimistic locking to ensure data consistency. Returns success confirmation or detailed error information.',
        inputSchema: {
          type: 'object',
          properties: {
            caseID: {
              type: 'string',
              description: 'Case ID. Example: "MYORG-APP-WORK C-1001". Complete identifier including spaces."ON6E5R-DIYRecipe-Work-RecipeCollection R-1008". a complete case identifier including spaces and special characters.'
            },
            participantID: {
              type: 'string',
              description: 'Participant ID to remove from the case. This identifies the specific participant that will be deleted from the case participant list.'
            },
            eTag: {
              type: 'string',
              description: 'Optional. Auto-fetched if omitted. For faster execution, use eTag from previous response.'
            },
            sessionCredentials: getSessionCredentialsSchema()
          },
          required: ['caseID', 'participantID']
        }
      };
    }
  • The deleteParticipant method in PegaClient wrapper class performs feature availability check and delegates to the underlying client for the actual API call to delete a participant.
    async deleteParticipant(caseID, participantID, eTag) {
      if (!this.isFeatureAvailable('participants')) {
        this.throwUnsupportedFeatureError('participants', 'deleteParticipant');
      }
      return this.client.deleteParticipant(caseID, participantID, eTag);
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 by disclosing key behavioral traits: it describes the destructive nature ('Delete'), eTag auto-fetching behavior, optimistic locking mechanism, and return value information ('success confirmation or detailed error'). However, it doesn't mention rate limits, authentication requirements beyond sessionCredentials parameter, or error specifics.

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 with three sentences that each serve distinct purposes: stating the core operation, explaining eTag behavior, and describing returns. It's front-loaded with the main action. Minor redundancy exists with 'Requires an eTag value' slightly conflicting with 'If no eTag is provided, automatically fetches'.

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?

For a destructive tool with 4 parameters (including a complex nested object) and no output schema, the description is adequate but has gaps. It covers the core operation and eTag behavior well, but lacks details on authentication requirements (beyond parameter existence), error formats, or what happens to related data when a participant is deleted.

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 baseline is 3. The description adds minimal value beyond the schema by mentioning eTag auto-fetching and its purpose for 'seamless operation' and 'optimistic locking', but doesn't provide additional semantic context for caseID or participantID parameters beyond what's in their schema descriptions.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the specific action ('Delete a participant from a Pega case') with the target resources ('by case ID and participant ID'), distinguishing it from sibling tools like 'delete_case' or 'delete_attachment'. It uses precise verbs and identifies the exact scope of operation.

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 through the mention of eTag handling and optimistic locking, but does not explicitly state when to use this tool versus alternatives like 'update_participant' or 'delete_case'. It provides some operational guidance but lacks explicit sibling differentiation or exclusion criteria.

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