get_case_followers
Retrieve the list of users following a case to receive updates and notifications. Provide a case ID to get follower information.
Instructions
Get the list of all the Case Followers. Retrieves information about users who are following a case to receive notifications and updates.
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. | |
| 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 execute() method is the main handler for the get_case_followers tool. It initializes session config, validates required params (caseID), then delegates to pegaClient.getCaseFollowers().
async execute(params) { const { caseID } = params; let sessionInfo = null; try { 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( `Get Case Followers: ${caseID}`, async () => await this.pegaClient.getCaseFollowers(caseID.trim()), { sessionInfo } ); } catch (error) { return { content: [{ type: 'text', text: `## Error: Get Case Followers: ${caseID}\n\n**Unexpected Error**: ${error.message}\n\n${sessionInfo ? `**Session**: ${sessionInfo.sessionId} (${sessionInfo.authMode} mode)\n` : ''}*Error occurred at: ${new Date().toISOString()}*` }] }; } } - getDefinition() defines the MCP tool schema: name is 'get_case_followers', input schema requires 'caseID' string, with optional 'sessionCredentials'.
static getDefinition() { return { name: 'get_case_followers', description: 'Get the list of all the Case Followers. Retrieves information about users who are following a case to receive notifications and updates.', 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.' }, sessionCredentials: getSessionCredentialsSchema() }, required: ['caseID'] } }; } - src/tools/followers/get-case-followers.js:8-10 (registration)getCategory() returns 'followers', which groups this tool under the followers category for automatic discovery by ConfigurableToolLoader.
static getCategory() { return 'followers'; } - src/api/pega-client.js:744-749 (helper)PegaClient.getCaseFollowers() delegates to the underlying API client (v2 only). It checks feature availability via isFeatureAvailable('followers') and calls this.client.getCaseFollowers(caseID).
async getCaseFollowers(caseID) { if (!this.isFeatureAvailable('followers')) { this.throwUnsupportedFeatureError('followers', 'getCaseFollowers'); } return this.client.getCaseFollowers(caseID); }