Skip to main content
Glama
marco-looy
by marco-looy

delete_case

Remove a case in the create stage by providing its caseID. This ensures efficient management of incomplete or unnecessary cases within the Pega DX MCP Server environment.

Instructions

Delete a case that is currently in the create stage

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
caseIDYesFull case handle (e.g.,ON6E5R-DIYRECIPE-WORK-RECIPECOLLECTION R-1008)

Implementation Reference

  • The execute method implements the 'delete_case' tool handler logic: parameter validation, session handling, API call to pegaClient.deleteCase, error handling, and response formatting.
    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()}*` }] }; } }
  • The getDefinition static method defines the MCP tool schema for 'delete_case', including name, description, and input schema requiring 'caseID'.
    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: 'Full case handle (e.g.,ON6E5R-DIYRECIPE-WORK-RECIPECOLLECTION R-1008)' }, sessionCredentials: getSessionCredentialsSchema() }, required: ['caseID'] } }; }
  • Custom formatSuccessResponse helper method for formatting successful delete_case responses with case details and warnings.
    formatSuccessResponse(operation, data, options = {}) { const { caseID, sessionInfo } = options; let response = `## ${operation}\n\n`; response += `*Operation completed at: ${new Date().toISOString()}*\n\n`; // Session Information (if applicable) if (sessionInfo) { response += `### Session Information\n`; response += `- **Session ID**: ${sessionInfo.sessionId}\n`; response += `- **Authentication Mode**: ${sessionInfo.authMode.toUpperCase()}\n`; response += `- **Configuration Source**: ${sessionInfo.configSource}\n\n`; } response += `✅ **Case ID**: ${caseID}\n\n`; response += '### Operation Details\n'; response += '- The case has been permanently removed from the system\n'; response += '- This action cannot be undone\n'; response += '- Only cases in the create stage can be deleted\n\n'; return response; }
  • The underlying pegaClient.deleteCase method called by the tool handler to perform the actual case deletion via the Pega API client.
    async deleteCase(caseID) { return this.client.deleteCase(caseID);

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