Skip to main content
Glama
pbandreddy

BlazeMeter MCP Server

by pbandreddy

get_test_run_timeline_kpis

Retrieve timeline KPIs report for a BlazeMeter test run to analyze performance metrics over time.

Instructions

Get the timeline KPIs report for a specified test run (master).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
masterIdYesThe ID of the test run (master) to retrieve the timeline KPIs report for.

Implementation Reference

  • The handler function that implements the core logic of the tool: fetches timeline KPIs report from BlazeMeter API using basic auth and the provided masterId.
    const executeFunction = async ({ masterId }) => {
      const baseUrl = process.env.BASE_URL; // loaded from .env
      const username = process.env.BZM_USERNAME; // loaded from .env
      const password = process.env.BZM_PASSWORD; // loaded from .env
    
      try {
        // Construct the URL for the timeline KPIs report
        const url = new URL(`${baseUrl}/api/v4/masters/${masterId}/reports/timeline/kpis`);
    
        // Set up headers for the request
        const headers = {
          'Authorization': 'Basic ' + Buffer.from(`${username}:${password}`).toString('base64'),
          'Accept': 'application/json'
        };
    
        // Perform the fetch request
        const response = await fetch(url.toString(), {
          method: 'GET',
          headers
        });
    
        // Check if the response was successful
        if (!response.ok) {
          let errorData;
          try {
            errorData = await response.json();
          } catch (jsonErr) {
            errorData = await response.text();
          }
          throw new Error(`HTTP ${response.status} ${response.statusText}: ${typeof errorData === 'string' ? errorData : JSON.stringify(errorData)}`);
        }
    
        // Parse and return the response data
        const data = await response.json();
        return data;
      } catch (error) {
        if (error instanceof Error) {
          return { error: error.message };
        } else {
          return { error: 'Unknown error occurred while getting timeline KPIs report.' };
        }
      }
    };
  • The tool schema defining the name, description, input parameters (masterId as required string), used for MCP tool calls.
      type: 'function',
      function: {
        name: 'get_test_run_timeline_kpis',
        description: 'Get the timeline KPIs report for a specified test run (master).',
        parameters: {
          type: 'object',
          properties: {
            masterId: {
              type: 'string',
              description: 'The ID of the test run (master) to retrieve the timeline KPIs report for.'
            }
          },
          required: ['masterId']
        }
      }
    }
  • lib/tools.js:7-16 (registration)
    Central registration function that dynamically loads and registers the apiTool from this module (via its path) into the list of available MCP 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);
    }
  • tools/paths.js:1-10 (registration)
    The toolPaths array includes the path to this tool's file, enabling its dynamic import during registration.
    export const toolPaths = [
      'blazemeter/new-collection/get-workspace-list.js',
      'blazemeter/new-collection/get-project-list.js',
      'blazemeter/new-collection/get-test-runs-list.js',
      'blazemeter/new-collection/get-test-run-summary.js',  
      'blazemeter/new-collection/get-test-run-aggregate-data.js',
      'blazemeter/new-collection/get-test-run-errors-data.js',
      'blazemeter/new-collection/get-test-run-thresholds.js',
      'blazemeter/new-collection/get-test-run-timeline-kpis.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 'Get[s]' data, implying a read-only operation, but doesn't clarify aspects like whether it requires specific permissions, returns real-time or cached data, handles errors, or includes pagination. For a tool with no annotation coverage, this leaves significant gaps in understanding its operational behavior.

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 unnecessary words. It is front-loaded with the core action and resource, making it easy to parse quickly. There is no wasted language, and it effectively communicates the essential information in a compact form.

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 has one parameter with full schema coverage and no output schema, the description provides a basic understanding of what the tool does. However, it lacks details on behavioral aspects like data format, error handling, or performance, which are important for a reporting tool. With no annotations and no output schema, the description is minimally adequate but could be more comprehensive to fully guide 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?

The input schema has 100% description coverage, with the 'masterId' parameter well-documented as 'The ID of the test run (master) to retrieve the timeline KPIs report for.' The description adds no additional parameter semantics beyond implying the tool is specific to a test run, which is already covered by the schema. This meets the baseline score of 3, as the schema adequately handles parameter documentation.

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 ('Get') and resource ('timeline KPIs report for a specified test run'), making the purpose understandable. It distinguishes this tool from siblings like 'get_test_run_summary' by specifying it retrieves timeline KPIs rather than general summary data. However, it doesn't explicitly contrast with all siblings, such as 'get_test_run_aggregate_data', which might offer similar but broader metrics.

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 minimal guidance by specifying it's for a 'specified test run (master)', implying usage when timeline KPIs are needed for a particular run. However, it offers no explicit advice on when to use this tool versus alternatives like 'get_test_run_summary' or 'get_test_run_aggregate_data', nor does it mention prerequisites or exclusions. This lack of comparative context limits its helpfulness in tool selection.

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/blazemeter-mcp-server'

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