Skip to main content
Glama
marco-looy
by marco-looy

delete_related_case

Remove the association between two linked cases by deleting their specified relationship in the Pega DX MCP Server. Input primary and related case IDs to disassociate them.

Instructions

Remove related work association between two cases by deleting a specific relationship

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
caseIDYesPrimary case ID from which to remove the related case. Example: "ON6E5R-DIYRecipe-Work-RecipeCollection R-1008". Must be a complete case identifier including spaces and special characters.
related_caseIDYesRelated case ID to be removed from the primary case. Example: "ON6E5R-DIYRecipe-Work-RecipeCollection R-1009". Must be a complete case identifier including spaces and special characters.

Implementation Reference

  • The execute method that implements the core logic of the delete_related_case tool. It validates parameters, initializes session if provided, and calls the PegaClient to delete the related case association.
    async execute(params) { const { caseID, related_caseID } = params; let sessionInfo = null; try { sessionInfo = this.initializeSessionConfig(params); // Validate required parameters using base class const requiredValidation = this.validateRequiredParams(params, ['caseID', 'related_caseID']); if (requiredValidation) { return requiredValidation; } // Execute with standardized error handling return await this.executeWithErrorHandling( `Delete Related Case: ${related_caseID} from ${caseID}`, async () => await this.pegaClient.deleteRelatedCase(caseID.trim(), related_caseID.trim()), { sessionInfo } ); } catch (error) { return { content: [{ type: 'text', text: `## Error: Delete Related Case: ${related_caseID} from ${caseID}\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 'delete_related_case', description, and input schema requiring caseID and related_caseID parameters.
    static getDefinition() { return { name: 'delete_related_case', description: 'Remove related work association between two cases by deleting a specific relationship', inputSchema: { type: 'object', properties: { caseID: { type: 'string', description: 'Primary case ID from which to remove the related case. Example: "ON6E5R-DIYRecipe-Work-RecipeCollection R-1008". Must be a complete case identifier including spaces and special characters.' }, related_caseID: { type: 'string', description: 'Related case ID to be removed from the primary case. Example: "ON6E5R-DIYRecipe-Work-RecipeCollection R-1009". Must be a complete case identifier including spaces and special characters.' }, sessionCredentials: getSessionCredentialsSchema() }, required: ['caseID', 'related_caseID'] } }; }
  • Dynamic registration of the tool: instantiates the tool class and registers it in loadedTools map using the name from getDefinition().
    const toolInstance = new ToolClass(); const toolName = ToolClass.getDefinition().name; this.loadedTools.set(toolName, { instance: toolInstance, class: ToolClass, category: category, filename: filename }); return toolInstance;
  • The PegaClient helper method called by the tool handler to perform the actual API call to delete a related case.
    async deleteRelatedCase(caseID, relatedCaseID) { if (!this.isFeatureAvailable('relatedCases')) { this.throwUnsupportedFeatureError('relatedCases', 'deleteRelatedCase'); } return this.client.deleteRelatedCase(caseID, relatedCaseID);

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