delete_case_follower
Remove a user from a case's follower list to stop case notifications and updates for that 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
| Name | Required | Description | Default |
|---|---|---|---|
| caseID | Yes | 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. | |
| 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. | |
| sessionCredentials | No | Optional 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 DeleteCaseFollowerTool class - the full tool implementation including the execute() method that handles the delete_case_follower logic. It extends BaseTool, validates required parameters (caseID, followerID), and calls pegaClient.deleteCaseFollower().
import { BaseTool } from '../../registry/base-tool.js'; import { getSessionCredentialsSchema } from '../../utils/tool-schema.js'; export class DeleteCaseFollowerTool extends BaseTool { /** * Get the category this tool belongs to */ static getCategory() { return 'followers'; } /** * Get tool definition 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: '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.' }, 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'] } }; } /** * Execute the delete case follower operation */ 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()}*` }] }; } } } - Tool definition with inputSchema for delete_case_follower, defining required parameters: caseID (string) and followerID (string), plus optional sessionCredentials.
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: '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.' }, 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/tools/followers/delete-case-follower.js:1-22 (registration)The tool is auto-discovered by ConfigurableToolLoader (src/registry/configurable-tool-loader.js) and ToolLoader (src/registry/tool-loader.js) by scanning the 'followers' category directory. The tool name 'delete_case_follower' is defined via getDefinition().name = 'delete_case_follower' at line 17.
import { BaseTool } from '../../registry/base-tool.js'; import { getSessionCredentialsSchema } from '../../utils/tool-schema.js'; export class DeleteCaseFollowerTool extends BaseTool { /** * Get the category this tool belongs to */ static getCategory() { return 'followers'; } /** * Get tool definition 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: { - src/api/pega-client.js:772-777 (helper)PegaClient.deleteCaseFollower() - the API client method that the tool calls. Checks if the 'followers' feature is available, then delegates to this.client.deleteCaseFollower().
async deleteCaseFollower(caseID, followerID) { if (!this.isFeatureAvailable('followers')) { this.throwUnsupportedFeatureError('followers', 'deleteCaseFollower'); } return this.client.deleteCaseFollower(caseID, followerID); }