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

delete_data_record

Remove specific data records from Pega data object classes by providing primary keys and a savable Data Page identifier configured for deletion operations.

Instructions

Delete a data record based on conditional save plan configured for a savable Data Page. Only supported on data object classes. Requires primary key(s) to uniquely identify the record to delete.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dataViewIDYesID of savable Data Page containing the record to delete. a valid data page identifier configured for delete operations.
dataViewParametersYesPrimary key(s) as JSON string to uniquely identify the data record to delete. a valid JSON object containing key-value pairs. For example: "{\"CustomerID\": \"12345\"}" or "{\"OrderID\": \"O-1001\", \"CustomerID\": \"C-5678\"}". Note: String format like "CustomerID=12345" will cause validation errors.
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 is the main handler for the 'delete_data_record' tool. It extracts parameters, initializes session configuration if provided, validates required inputs, and executes the deletion via pegaClient.deleteDataRecord with comprehensive error handling.
    async execute(params) { const { dataViewID, dataViewParameters } = params; let sessionInfo = null; try { sessionInfo = this.initializeSessionConfig(params); // Validate required parameters const requiredValidation = this.validateRequiredParams(params, ['dataViewID', 'dataViewParameters']); if (requiredValidation) { return requiredValidation; } // Execute with standardized error handling return await this.executeWithErrorHandling( `Delete Data Record: ${dataViewID}`, async () => await this.pegaClient.deleteDataRecord(dataViewID, dataViewParameters), { sessionInfo } ); } catch (error) { return { content: [{ type: 'text', text: `## Error: Delete Data Record: ${dataViewID}\n\n**Unexpected Error**: ${error.message}\n\n${sessionInfo ? `**Session**: ${sessionInfo.sessionId} (${sessionInfo.authMode} mode)\n` : ''}*Error occurred at: ${new Date().toISOString()}*` }] }; } }
  • The static getDefinition() method defines the tool schema for MCP, including name 'delete_data_record', description, and inputSchema with properties for dataViewID, dataViewParameters (JSON string of primary keys), and optional sessionCredentials.
    static getDefinition() { return { name: 'delete_data_record', description: 'Delete a data record based on conditional save plan configured for a savable Data Page. Only supported on data object classes. Requires primary key(s) to uniquely identify the record to delete.', inputSchema: { type: 'object', properties: { dataViewID: { type: 'string', description: 'ID of savable Data Page containing the record to delete. a valid data page identifier configured for delete operations.' }, dataViewParameters: { type: 'string', description: 'Primary key(s) as JSON string to uniquely identify the data record to delete. a valid JSON object containing key-value pairs. For example: "{\\"CustomerID\\": \\"12345\\"}" or "{\\"OrderID\\": \\"O-1001\\", \\"CustomerID\\": \\"C-5678\\"}". Note: String format like "CustomerID=12345" will cause validation errors.' }, sessionCredentials: getSessionCredentialsSchema() }, required: ['dataViewID', 'dataViewParameters'] } }; }
  • Static getCategory() returns 'dataviews', used by the loader to categorize and discover the tool.
    static getCategory() { return 'dataviews'; }
  • PegaClient.deleteDataRecord method, called by the tool handler, delegates the actual API call to the version-specific client (v1 or v2).
    async deleteDataRecord(dataViewID, dataViewParameters) { return this.client.deleteDataRecord(dataViewID, dataViewParameters); }

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