Skip to main content
Glama
marco-looy

Pega DX MCP Server

by marco-looy

delete_case

Remove a case that is still in the creation stage using its complete case ID. This tool helps clean up draft cases before they progress further in the workflow.

Instructions

Delete a case that is currently in the create stage

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
caseIDYesCase ID. Example: "MYORG-APP-WORK C-1001". Complete identifier including spaces.
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 execute method implements the core logic of the delete_case MCP tool. It validates the caseID parameter, handles session configuration, performs the deletion via pegaClient.deleteCase, and formats success/error responses.
      async execute(params) {
        const { caseID } = params;
        let sessionInfo = null;
    
        try {
          // Initialize session configuration if provided
          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(
            `Case Deletion: ${caseID}`,
            async () => await this.pegaClient.deleteCase(caseID.trim()),
            { caseID, sessionInfo }
          );
        } catch (error) {
          return {
            content: [{
              type: 'text',
              text: `## Error: Delete Case
    
    **Unexpected Error**: ${error.message}
    
    ${sessionInfo ? `**Session**: ${sessionInfo.sessionId} (${sessionInfo.authMode} mode)\n` : ''}*Error occurred at: ${new Date().toISOString()}*`
            }]
          };
        }
      }
  • Defines the MCP tool schema including name 'delete_case', description, and inputSchema requiring 'caseID' string parameter.
    static getDefinition() {
      return {
        name: 'delete_case',
        description: 'Delete a case that is currently in the create stage',
        inputSchema: {
          type: 'object',
          properties: {
            caseID: {
              type: 'string',
              description: 'Case ID. Example: "MYORG-APP-WORK C-1001". Complete identifier including spaces.'
            },
            sessionCredentials: getSessionCredentialsSchema()
          },
          required: ['caseID']
        }
      };
    }
  • The PegaClient.deleteCase method called by the tool handler to perform the actual API deletion by routing to the appropriate version-specific client (v1 or v2).
    async deleteCase(caseID) {
      return this.client.deleteCase(caseID);
    }
Behavior2/5

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

With no annotations provided, the description carries full burden but only states the action without disclosing behavioral traits. It doesn't mention whether deletion is permanent/reversible, required permissions, error conditions (e.g., if case isn't in create stage), or side effects. For a destructive operation with zero annotation coverage, this is inadequate.

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 a single, clear sentence that efficiently states the tool's purpose. It's front-loaded with the core action and includes a useful constraint ('in the create stage'), with no wasted words or unnecessary elaboration.

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 destructive tool with no annotations and no output schema, the description is incomplete. It lacks critical context such as what 'delete' entails (permanent/soft), success/error responses, authentication requirements implied by sessionCredentials, or how it interacts with sibling tools in the case management system.

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?

Schema description coverage is 100%, so the schema fully documents both parameters (caseID and sessionCredentials). The description adds no parameter-specific information beyond what's in the schema, maintaining the baseline score of 3 where the schema does the heavy lifting.

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 action ('Delete') and resource ('a case'), specifying it applies to cases 'currently in the create stage'. This distinguishes it from general deletion tools but doesn't explicitly differentiate from sibling tools like 'delete_related_case' or 'delete_data_record' which handle different resources.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides minimal guidance by specifying 'currently in the create stage', which implies a precondition but doesn't explain when to use this versus alternatives like 'update_case' to modify instead of delete, or what happens if the case isn't in the create stage. No explicit when-not-to-use or sibling tool comparisons are provided.

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