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

get_data_view_metadata

Retrieve metadata for Pega data views including parameters and queryable fields to understand data structure and query capabilities.

Instructions

Retrieve data view metadata which includes data view parameters and list of queryable fields. Supports both queryable and non-queryable data views.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dataViewIDYesID of the data view to retrieve metadata for. Example: "D_CaseList", "D_WorkBasket"
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 of the GetDataViewMetadataTool class implements the tool's core logic: initializes session configuration, validates the required dataViewID parameter, and executes the Pega API call via pegaClient.getDataViewMetadata with standardized error handling.
    async execute(params) { const { dataViewID } = params; let sessionInfo = null; try { sessionInfo = this.initializeSessionConfig(params); // Validate required parameters using base class const requiredValidation = this.validateRequiredParams(params, ['dataViewID']); if (requiredValidation) { return requiredValidation; } // Execute with standardized error handling return await this.executeWithErrorHandling( `Data View Metadata: ${dataViewID}`, async () => await this.pegaClient.getDataViewMetadata(dataViewID.trim()), { sessionInfo } ); } catch (error) { return { content: [{ type: 'text', text: `## Error: Data View Metadata: ${dataViewID}\n\n**Unexpected Error**: ${error.message}\n\n${sessionInfo ? `**Session**: ${sessionInfo.sessionId} (${sessionInfo.authMode} mode)\n` : ''}*Error occurred at: ${new Date().toISOString()}*` }] }; } }
  • Static getDefinition method provides the MCP tool definition including the exact name 'get_data_view_metadata', description, and input schema requiring dataViewID (string) with optional sessionCredentials.
    static getDefinition() { return { name: 'get_data_view_metadata', description: 'Retrieve data view metadata which includes data view parameters and list of queryable fields. Supports both queryable and non-queryable data views.', inputSchema: { type: 'object', properties: { dataViewID: { type: 'string', description: 'ID of the data view to retrieve metadata for. Example: "D_CaseList", "D_WorkBasket"' }, sessionCredentials: getSessionCredentialsSchema() }, required: ['dataViewID'] } };
  • In ToolLoader.loadToolFile, after validating the tool class from get-data-view-metadata.js, it instantiates the class and registers it in loadedTools Map by its name 'get_data_view_metadata'.
    // Create and register tool instance const toolInstance = new ToolClass(); const toolName = ToolClass.getDefinition().name; this.loadedTools.set(toolName, { instance: toolInstance, class: ToolClass, category: category, filename: filename }); return toolInstance; } catch (error) {

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