Skip to main content
Glama
marco-looy
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); }

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