Skip to main content
Glama
marco-looy

Pega DX MCP Server

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) {
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries full burden. It mentions retrieving metadata but fails to disclose critical behavioral traits: whether this is a read-only operation, if it requires authentication (implied by sessionCredentials parameter but not stated), rate limits, or what the output format looks like. This leaves significant gaps for an agent to understand the tool's behavior.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that front-loads the core purpose. It avoids redundancy and wastes no words, though it could be slightly more structured by separating usage notes from the main action.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool has no annotations, no output schema, and involves authentication complexities (sessionCredentials), the description is incomplete. It doesn't explain what metadata is returned, how to handle authentication modes, or error cases, making it inadequate for an agent to fully understand the tool's context and usage.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, providing detailed documentation for both parameters (dataViewID and sessionCredentials). The description adds no additional parameter semantics beyond what the schema already covers, such as examples or usage tips. With high schema coverage, the baseline score of 3 is appropriate as the description doesn't compensate but doesn't detract either.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb 'retrieve' and the resource 'data view metadata', specifying it includes parameters and queryable fields. It distinguishes this tool from siblings like 'get_list_data_view' or 'get_data_view_count' by focusing on metadata rather than data or counts, though it doesn't explicitly name these alternatives.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage by mentioning support for both queryable and non-queryable data views, suggesting it's for inspecting data view structure. However, it lacks explicit guidance on when to use this tool versus alternatives like 'get_list_data_view' (for actual data) or prerequisites such as authentication needs, leaving usage context somewhat inferred.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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