Skip to main content
Glama
pbandreddy

LoadRunner Cloud MCP Server

by pbandreddy

test_runs_getTestRunTransactions

Retrieve transaction details from a LoadRunner Cloud performance test run to analyze individual component performance and identify bottlenecks.

Instructions

List all transaction information in a test run.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
runIdYesThe ID of the test run.

Implementation Reference

  • Handler function that authenticates using getAuthToken, constructs API URL for test run transactions, performs GET request with percentiles 90/95, handles errors, and returns parsed JSON data.
    const executeFunction = async ({ runId }) => {
      const baseUrl = process.env.LRC_BASE_URL;
      const tenantId = process.env.LRC_TENANT_ID;
      const token = await getAuthToken();
      try {
        // Construct the URL with query parameters
        const url = new URL(`${baseUrl}/test-runs/${runId}/transactions`);
        url.searchParams.append('TENANTID', tenantId);
        url.searchParams.append('percentile', 90);
        url.searchParams.append('percentile', 95);
    
        // Set up headers for the request
        const headers = {
          'Content-Type': 'application/json',
          'Authorization': `Bearer ${token}`
        };
    
        // Perform the fetch request
        const response = await fetch(url.toString(), {
          method: 'GET',
          headers
        });
    
        // Check if the response was successful
        if (!response.ok) {
          const text = await response.text();
          try {
            const errorData = JSON.parse(text);
            throw new Error(JSON.stringify(errorData));
          } catch (jsonErr) {
            // Not JSON, log the raw text
            console.error('Non-JSON error response:', text);
            throw new Error(text);
          }
        }
    
        // Parse and return the response data
        const text = await response.text();
        try {
          const data = JSON.parse(text);
          return data;
        } catch (jsonErr) {
          // Not JSON, log the raw text
          console.error('Non-JSON success response:', text);
          return { error: 'Received non-JSON response from API', raw: text };
        }
      } catch (error) {
        console.error('Error retrieving test run transactions:', error);
        return { error: 'An error occurred while retrieving test run transactions.' };
      }
    };
  • Input schema definition for the tool, specifying the required 'runId' parameter.
      name: 'test_runs_getTestRunTransactions',
      description: 'List all transaction information in a test run.',
      parameters: {
        type: 'object',
        properties: {
          runId: {
            type: 'string',
            description: 'The ID of the test run.'
          }
        },
        required: ['runId']
      }
    }
  • tools/paths.js:1-11 (registration)
    Registration via toolPaths array listing the implementation file path for dynamic loading.
    export const toolPaths = [
      'loadrunner-cloud/load-runner-cloud-api/projects-get-projects.js',
      'loadrunner-cloud/load-runner-cloud-api/test-runs-get-active-test-runs.js',
      'loadrunner-cloud/load-runner-cloud-api/test-runs-get-test-run-transactions.js',
      'loadrunner-cloud/load-runner-cloud-api/test-runs-get-test-run-summary.js',
      'loadrunner-cloud/load-runner-cloud-api/test-runs-get-http-responses.js',
      'loadrunner-cloud/load-runner-cloud-api/test-runs-get-test-run-recent.js',
      'loadrunner-cloud/load-runner-cloud-api/projects-get-load-tests.js',
      'loadrunner-cloud/load-runner-cloud-api/projects-get-load-test-scripts.js',
      'loadrunner-cloud/load-runner-cloud-api/projects-get-load-test-runs.js'
    ];
  • lib/tools.js:7-16 (registration)
    Dynamic registration function that imports apiTool from each listed path, including this tool, to collect all available tools.
    export async function discoverTools() {
      const toolPromises = toolPaths.map(async (file) => {
        const module = await import(`../tools/${file}`);
        return {
          ...module.apiTool,
          path: file,
        };
      });
      return Promise.all(toolPromises);
    }
  • Imports the helper function getAuthToken used for authentication in the handler.
    import { getAuthToken } from './auth-get-token.js';
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the tool lists transaction information but does not describe key traits such as whether it's read-only, if it requires authentication, potential rate limits, or the format of returned data (e.g., pagination, error handling). For a tool with zero annotation coverage, this is a significant gap in transparency.

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

Conciseness5/5

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

The description is a single, efficient sentence: 'List all transaction information in a test run.' It is front-loaded with the core action and resource, with no unnecessary words or redundancy. This makes it easy to parse and understand quickly, earning a high score for conciseness.

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 complexity of a tool that lists data (implying read operations) and the absence of annotations and output schema, the description is incomplete. It does not explain what 'transaction information' entails, how results are structured, or any behavioral aspects like safety or performance. For a tool with no structured support, more detail is needed to ensure the agent can use it effectively.

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?

The input schema has 100% description coverage, with the 'runId' parameter clearly documented as 'The ID of the test run.' The description does not add any additional meaning beyond this, such as format examples or constraints. Given the high schema coverage, a baseline score of 3 is appropriate, as the schema adequately handles parameter documentation without extra value from the description.

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 tool's purpose: 'List all transaction information in a test run.' It specifies the verb ('List') and resource ('transaction information in a test run'), making the function understandable. However, it does not explicitly differentiate from sibling tools like 'test_runs_getHttpResponses' or 'test_runs_getTestRunResults,' which may also retrieve related test run data, leaving some ambiguity about uniqueness.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives. It lacks context such as prerequisites (e.g., needing a valid runId), exclusions, or comparisons to sibling tools like 'test_runs_getRecentTestRuns' or 'test_runs_getHttpResponses,' which could serve similar purposes. This absence limits the agent's ability to choose the correct tool in different scenarios.

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/pbandreddy/loadrunner-cloud-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server