Skip to main content
Glama
pbandreddy

LoadRunner Cloud MCP Server

by pbandreddy

projects_getLoadTestRuns

Retrieve load test runs for a project to analyze performance test results and monitor execution data.

Instructions

Retrieve runs for a load test in a project from LoadRunner Cloud.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
projectIdYesThe ID of the project.
loadTestIdYesThe ID of the load test.

Implementation Reference

  • The `executeFunction` handler that performs the HTTP GET request to the LoadRunner Cloud API to retrieve load test runs for the specified project and load test.
    const executeFunction = async ({ projectId, loadTestId }) => {
      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}/projects/${projectId}/load-tests/${loadTestId}/runs`);
        url.searchParams.append('TENANTID', tenantId);
    
        // 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 load test runs:', error);
        return { error: 'An error occurred while retrieving load test runs.' };
      }
    };
  • Input schema defining the required parameters `projectId` and `loadTestId` as strings.
    parameters: {
      type: 'object',
      properties: {
        projectId: {
          type: 'string',
          description: 'The ID of the project.'
        },
        loadTestId: {
          type: 'string',
          description: 'The ID of the load test.'
        }
      },
      required: ['projectId', 'loadTestId']
    }
  • The `apiTool` object that registers the tool with its handler, name 'projects_getLoadTestRuns', description, and schema. This is exported and discovered dynamically.
    const apiTool = {
      function: executeFunction,
      definition: {
        type: 'function',
        function: {
          name: 'projects_getLoadTestRuns',
          description: 'Retrieve runs for a load test in a project from LoadRunner Cloud.',
          parameters: {
            type: 'object',
            properties: {
              projectId: {
                type: 'string',
                description: 'The ID of the project.'
              },
              loadTestId: {
                type: 'string',
                description: 'The ID of the load test.'
              }
            },
            required: ['projectId', 'loadTestId']
          }
        }
      }
    };
  • tools/paths.js:10-10 (registration)
    The tool module path is listed in `toolPaths` array, enabling its discovery and registration via `discoverTools()`.
    'loadrunner-cloud/load-runner-cloud-api/projects-get-load-test-runs.js'
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It only states the action ('Retrieve runs') without detailing aspects like whether it's read-only, pagination behavior, rate limits, authentication needs, or what 'runs' entail (e.g., status, metadata). This is inadequate for a tool with potential complexity.

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 directly states the tool's purpose without unnecessary words. It's appropriately sized for a simple retrieval tool, though it could be slightly more informative without losing 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 lack of annotations and output schema, the description is incomplete. It doesn't explain what 'runs' include (e.g., data structure, fields) or behavioral traits like error handling. For a retrieval tool in a context with multiple sibling tools, more detail is needed to guide effective use.

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, clearly documenting both parameters ('projectId' and 'loadTestId') with their types and purposes. The description adds no additional semantic context beyond what the schema provides, such as format examples or relationships between parameters, so it meets the baseline for high schema coverage.

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 action ('Retrieve runs') and resource ('for a load test in a project from LoadRunner Cloud'), making the purpose understandable. However, it doesn't explicitly differentiate from sibling tools like 'test_runs_getRecentTestRuns' or 'test_runs_getTestRunResults', which also retrieve test run data, so it misses full sibling distinction.

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, such as how it differs from 'test_runs_getRecentTestRuns' or 'test_runs_getTestRunResults'. There's no mention of prerequisites, context, or exclusions, leaving usage unclear.

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