delete_case_follower
Remove a user as a follower from a case in Pega DX MCP Server to stop their notifications and updates. Specify the case ID and follower user ID to disassociate the user.
Instructions
Remove a follower from a case, ending their subscription to case notifications and updates. Removes the follower association between case and user.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| caseID | Yes | Full case handle (case ID) to remove follower from. Example: "OSIEO3-DOCSAPP-WORK T-561003". Must be a complete case identifier including spaces and special characters. | |
| followerID | Yes | User ID of the follower to remove from the case. This is the unique identifier for the user in the Pega system who will no longer follow the case. |
Implementation Reference
- The main handler function that validates parameters, initializes session if provided, and calls the Pega API to delete the case follower.async execute(params) { const { caseID, followerID } = params; let sessionInfo = null; try { sessionInfo = this.initializeSessionConfig(params); // Validate required parameters using base class const requiredValidation = this.validateRequiredParams(params, ['caseID', 'followerID']); if (requiredValidation) { return requiredValidation; } // Execute with standardized error handling return await this.executeWithErrorHandling( `Delete Case Follower: ${caseID} - ${followerID}`, async () => await this.pegaClient.deleteCaseFollower(caseID.trim(), followerID.trim()), { sessionInfo } ); } catch (error) { return { content: [{ type: 'text', text: `## Error: Delete Case Follower: ${caseID} - ${followerID}\n\n**Unexpected Error**: ${error.message}\n\n${sessionInfo ? `**Session**: ${sessionInfo.sessionId} (${sessionInfo.authMode} mode)\n` : ''}*Error occurred at: ${new Date().toISOString()}*` }] }; } }
- Static method providing the tool definition including name, description, and input schema for MCP protocol.static getDefinition() { return { name: 'delete_case_follower', description: 'Remove a follower from a case, ending their subscription to case notifications and updates. Removes the follower association between case and user.', inputSchema: { type: 'object', properties: { caseID: { type: 'string', description: 'Full case handle (case ID) to remove follower from. Example: "OSIEO3-DOCSAPP-WORK T-561003". Must be a complete case identifier including spaces and special characters.' }, followerID: { type: 'string', description: 'User ID of the follower to remove from the case. This is the unique identifier for the user in the Pega system who will no longer follow the case.' }, sessionCredentials: getSessionCredentialsSchema() }, required: ['caseID', 'followerID'] } }; }
- src/api/pega-client.js:777-782 (helper)PegaClient wrapper method that calls the underlying client to delete a case follower, with feature availability check.async deleteCaseFollower(caseID, followerID) { if (!this.isFeatureAvailable('followers')) { this.throwUnsupportedFeatureError('followers', 'deleteCaseFollower'); } return this.client.deleteCaseFollower(caseID, followerID); }
- src/registry/configurable-tool-loader.js:35-35 (registration)The configurable tool loader that dynamically discovers, validates, instantiates, and registers all tools including delete_case_follower by scanning src/tools/followers directory.this.config = await toolConfig.load();
- src/registry/base-tool.js:446-460 (helper)BaseTool method used by the handler for standardized error handling and response formatting.async executeWithErrorHandling(operation, apiCall, options = {}) { try { const result = await apiCall(); if (result.success) { return this.createResponse(true, operation, result.data, options); } else { return this.createErrorResponse(operation, result.error, options); } } catch (error) { return { error: `Unexpected error during ${operation}: ${error.message}` }; } }