get_data_objects
Retrieve available data objects with metadata and links from Pega DX MCP Server. Filter by data or case types to find specific objects for integration.
Instructions
Retrieve list of available data objects with metadata and HATEOAS links. Can optionally filter by data object type (data or case).
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| type | No | Filter for data object type. Returns "data" or "case" type objects. | |
| 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
- The execute method implements the core handler logic for the 'get_data_objects' tool. It handles input parameters (type), session initialization, enum validation, error handling, and calls the underlying pegaClient.getDataObjects({ type }).async execute(params) { const { type } = params; let sessionInfo = null; try { sessionInfo = this.initializeSessionConfig(params); // Validate enum parameters if provided const enumValidation = this.validateEnumParams(params, { type: ['data', 'case'] }); if (enumValidation) { return enumValidation; } // Execute with standardized error handling return await this.executeWithErrorHandling( `Data Objects List${type ? ` (type: ${type})` : ''}`, async () => await this.pegaClient.getDataObjects({ type }), { sessionInfo } ); } catch (error) { return { content: [{ type: 'text', text: `## Error: Data Objects List${type ? ` (type: ${type})` : ''}\n\n**Unexpected Error**: ${error.message}\n\n${sessionInfo ? `**Session**: ${sessionInfo.sessionId} (${sessionInfo.authMode} mode)\n` : ''}*Error occurred at: ${new Date().toISOString()}*` }] }; } }
- Static getDefinition() provides the tool schema including name 'get_data_objects', description, and inputSchema with optional 'type' (enum: 'data', 'case') and sessionCredentials.static getDefinition() { return { name: 'get_data_objects', description: 'Retrieve list of available data objects with metadata and HATEOAS links. Can optionally filter by data object type (data or case).', inputSchema: { type: 'object', properties: { type: { type: 'string', enum: ['data', 'case'], description: 'Filter for data object type. Returns "data" or "case" type objects.' }, sessionCredentials: getSessionCredentialsSchema() }, required: [] } }; }
- src/api/pega-client.js:657-658 (helper)Helper method in PegaClient class that wraps the underlying client.getDataObjects(options), directly invoked by the tool handler.async getDataObjects(options = {}) { return this.client.getDataObjects(options);
- src/registry/tool-loader.js:123-131 (registration)Dynamic registration logic in ToolLoader.loadToolFile where tools are discovered, validated, instantiated, and registered in loadedTools Map by their getDefinition().name. This is how get_data_objects is automatically registered during discovery.const toolInstance = new ToolClass(); const toolName = ToolClass.getDefinition().name; this.loadedTools.set(toolName, { instance: toolInstance, class: ToolClass, category: category, filename: filename });