Skip to main content
Glama
marco-looy

Pega DX MCP Server

by marco-looy

add_case_followers

Add users as followers to a Pega case to enable them to receive notifications and updates about case progress.

Instructions

Add multiple followers to a work object. Allows users to follow a case to receive notifications and updates about case progress.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
caseIDYesCase 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.
usersYesArray of user objects to add as followers to the case. Each user object should contain user identification information.
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 main handler function that implements the tool logic: validates caseID and users array (each with ID), initializes session, and executes pegaClient.addCaseFollowers with error handling.
    async execute(params) {
      const { caseID, users } = params;
      let sessionInfo = null;
    
      try {
        sessionInfo = this.initializeSessionConfig(params);
    
        // Validate required parameters using base class
        const requiredValidation = this.validateRequiredParams(params, ['caseID', 'users']);
        if (requiredValidation) {
          return requiredValidation;
        }
    
        // Validate users array
        if (!Array.isArray(users) || users.length === 0) {
          return {
            error: 'users parameter must be a non-empty array of user objects.'
          };
        }
    
        // Validate each user object
        for (let i = 0; i < users.length; i++) {
          const user = users[i];
          if (!user.ID) {
            return {
              error: `User at index ${i} is missing required ID field.`
            };
          }
        }
    
        // Execute with standardized error handling
        return await this.executeWithErrorHandling(
          `Add Case Followers: ${caseID}`,
          async () => await this.pegaClient.addCaseFollowers(caseID.trim(), users),
          { sessionInfo }
        );
      } catch (error) {
        return {
          content: [{
            type: 'text',
            text: `## Error: Add 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()}*`
          }]
        };
      }
    }
  • Input schema defining parameters: caseID (string), users (array of objects with required ID string, minItems 1), and optional sessionCredentials.
    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.'
        },
        users: {
          type: 'array',
          description: 'Array of user objects to add as followers to the case. Each user object should contain user identification information.',
          items: {
            type: 'object',
            properties: {
              ID: {
                type: 'string',
                description: 'User identifier of the person to add as a follower. This is the unique identifier for the user in the Pega system.'
              }
            },
            required: ['ID']
          },
          minItems: 1
        },
        sessionCredentials: getSessionCredentialsSchema()
      },
      required: ['caseID', 'users']
    }
  • Tool definition including name 'add_case_followers', description, and inputSchema. Used by the dynamic loader to register the tool.
    static getDefinition() {
      return {
        name: 'add_case_followers',
        description: 'Add multiple followers to a work object. Allows users to follow a case to receive notifications and updates about case progress.',
        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.'
            },
            users: {
              type: 'array',
              description: 'Array of user objects to add as followers to the case. Each user object should contain user identification information.',
              items: {
                type: 'object',
                properties: {
                  ID: {
                    type: 'string',
                    description: 'User identifier of the person to add as a follower. This is the unique identifier for the user in the Pega system.'
                  }
                },
                required: ['ID']
              },
              minItems: 1
            },
            sessionCredentials: getSessionCredentialsSchema()
          },
          required: ['caseID', 'users']
        }
      };
    }
  • Helper method in PegaClient wrapper that checks feature availability and delegates to the underlying client.addCaseFollowers.
    async addCaseFollowers(caseID, users) {
      if (!this.isFeatureAvailable('followers')) {
        this.throwUnsupportedFeatureError('followers', 'addCaseFollowers');
      }
      return this.client.addCaseFollowers(caseID, users);
    }
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It mentions the tool's purpose and outcome ('receive notifications and updates') but doesn't disclose critical behavioral traits: whether this is a mutation requiring specific permissions, if there are rate limits, what happens on duplicate followers, or what the response looks like. For a mutation tool with zero annotation coverage, this leaves significant gaps in understanding its behavior and constraints.

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 concise with two sentences that directly state the tool's function and purpose. The first sentence clearly defines the action, and the second explains the outcome. There's no unnecessary information, and it's front-loaded with the core functionality. It could potentially be slightly more structured but remains efficient.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given this is a mutation tool with no annotations and no output schema, the description is incomplete. It doesn't address what the tool returns, error conditions, authentication requirements (though partially covered in schema), or how it interacts with the system. The description alone doesn't provide enough context for an agent to fully understand the tool's behavior and implications, especially for a write operation.

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?

The schema description coverage is 100%, meaning all parameters are documented in the input schema. The description doesn't add any parameter-specific information beyond what's already in the schema descriptions (e.g., it doesn't explain caseID format or user ID requirements further). According to the scoring rules, when schema coverage is high (>80%), the baseline is 3 even with no param info in the description, which applies here.

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

Purpose4/5

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

The description clearly states the tool's purpose: 'Add multiple followers to a work object' with the specific verb 'add' and resource 'followers'. It distinguishes this from sibling tools like 'delete_case_follower' and 'get_case_followers' by focusing on addition rather than removal or retrieval. However, it doesn't explicitly differentiate from similar tools like 'add_case_attachments' or 'add_case_tags' beyond the resource type.

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 by stating it 'allows users to follow a case to receive notifications and updates about case progress', suggesting this is for notification management. However, it doesn't provide explicit guidance on when to use this tool versus alternatives like 'create_case_participant' or 'update_participant', nor does it mention prerequisites or exclusions. The context is clear but lacks specific comparative guidance.

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