Skip to main content
Glama
pbandreddy

LoadRunner Cloud MCP Server

by pbandreddy

get_active_test_runs

Retrieve currently executing performance tests from LoadRunner Cloud to monitor ongoing test execution status and progress.

Instructions

Get active test runs from LoadRunner Cloud.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
statusNoThe status of the test runs (RUNNING, INITIALIZING, CHECKING_STATUS, STOPPING, DELAYED).
projectIdsNoThe project IDs to filter the test runs (empty means all).

Implementation Reference

  • The main handler function `executeFunction` that fetches active test runs from LoadRunner Cloud. It handles authentication, constructs the API URL with optional filters (status, projectIds), makes a GET request, parses JSON response, and manages errors.
    const executeFunction = async ({ status = '', projectIds = '' } = {}) => {
      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/active`);
        url.searchParams.append('TENANTID', tenantId);
        if (status) url.searchParams.append('status', status);
        if (projectIds) url.searchParams.append('projectIds', projectIds);
    
        // 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 fetching active test runs:', error);
        return { error: 'An error occurred while fetching active test runs.' };
      }
    };
  • The input schema definition for the tool, specifying optional parameters `status` and `projectIds`.
    parameters: {
      type: 'object',
      properties: {
        status: {
          type: 'string',
          description: 'The status of the test runs (RUNNING, INITIALIZING, CHECKING_STATUS, STOPPING, DELAYED).'
        },
        projectIds: {
          type: 'string',
          description: 'The project IDs to filter the test runs (empty means all).'
        }
      },
      required: []
    }
  • tools/paths.js:3-3 (registration)
    The tool's file path is listed in `toolPaths` array, enabling dynamic discovery and loading.
    'loadrunner-cloud/load-runner-cloud-api/test-runs-get-active-test-runs.js',
  • lib/tools.js:7-16 (registration)
    The `discoverTools` function dynamically imports the tool module using its path from `toolPaths` and extracts the `apiTool` object for registration in the MCP server.
    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);
    }
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. While 'Get' implies a read operation, the description doesn't specify whether this returns all active runs or is paginated, what format the output takes, or any authentication or rate limit requirements. For a retrieval tool with zero annotation coverage, this leaves significant behavioral gaps.

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 that directly states the tool's purpose without any unnecessary words. It's appropriately sized and front-loaded with the core functionality.

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

Completeness3/5

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

Given the tool's moderate complexity (2 optional parameters, no output schema, no annotations), the description is minimally adequate but incomplete. It states what the tool does but lacks behavioral context (output format, pagination), usage differentiation from siblings, and doesn't compensate for the absence of annotations. A retrieval tool with multiple similar siblings needs more guidance.

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%, so the schema already fully documents both parameters (status and projectIds). The description doesn't add any additional parameter semantics beyond what's in the schema, such as explaining what 'active' means in relation to the status parameter or providing examples. The baseline of 3 is appropriate when the schema does all the parameter documentation work.

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 ('Get') and resource ('active test runs from LoadRunner Cloud'), making the purpose immediately understandable. However, it doesn't differentiate this tool from sibling tools like 'test_runs_getRecentTestRuns' or 'test_runs_getTestRunResults', which appear to be related test run retrieval operations.

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. With multiple sibling tools that appear to retrieve test runs (e.g., 'test_runs_getRecentTestRuns', 'test_runs_getTestRunResults'), there's no indication of what makes 'active' test runs different or when this specific tool should be preferred.

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