delete_case_tag
Remove a specific tag from a Pega case by providing the case ID and tag ID to manage case organization and metadata.
Instructions
Delete a specific tag from a case by case ID and tag ID
Input Schema
TableJSON 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. | |
| tagID | Yes | Tag ID to be deleted from the case. This is the unique identifier of the specific tag to remove. | |
| 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
- src/tools/tags/delete-case-tag.js:40-67 (handler)The execute method that performs the tool's core logic: validates inputs, initializes session, handles errors, and calls pegaClient.deleteCaseTag to delete the tag from the case.async execute(params) { const { caseID, tagID } = params; let sessionInfo = null; try { sessionInfo = this.initializeSessionConfig(params); // Validate required parameters using base class const requiredValidation = this.validateRequiredParams(params, ['caseID', 'tagID']); if (requiredValidation) { return requiredValidation; } // Execute with standardized error handling return await this.executeWithErrorHandling( `Delete Tag: ${tagID} from Case: ${caseID}`, async () => await this.pegaClient.deleteCaseTag(caseID.trim(), tagID.trim()), { sessionInfo } ); } catch (error) { return { content: [{ type: 'text', text: `## Error: Delete Tag: ${tagID} from Case: ${caseID}\n\n**Unexpected Error**: ${error.message}\n\n${sessionInfo ? `**Session**: ${sessionInfo.sessionId} (${sessionInfo.authMode} mode)\n` : ''}*Error occurred at: ${new Date().toISOString()}*` }] }; } }
- Static method providing the tool definition for MCP protocol, including name 'delete_case_tag', description, and input schema requiring caseID and tagID.static getDefinition() { return { name: 'delete_case_tag', description: 'Delete a specific tag from a case by case ID and tag ID', 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.' }, tagID: { type: 'string', description: 'Tag ID to be deleted from the case. This is the unique identifier of the specific tag to remove.' }, sessionCredentials: getSessionCredentialsSchema() }, required: ['caseID', 'tagID'] } }; }
- src/api/pega-client.js:927-932 (helper)PegaClient wrapper for deleting a case tag, checks if 'tags' feature is available, then delegates to the underlying client implementation.async deleteCaseTag(caseID, tagID) { if (!this.isFeatureAvailable('tags')) { this.throwUnsupportedFeatureError('tags', 'deleteCaseTag'); } return this.client.deleteCaseTag(caseID, tagID); }