Skip to main content
Glama
pbandreddy

BlazeMeter MCP Server

by pbandreddy

get_test_run_errors_data

Retrieve error report data for a specific test run on BlazeMeter MCP Server to analyze performance issues and identify root causes.

Instructions

Get the errors report data for a specified test run (master).

Input Schema

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

Implementation Reference

  • The handler function `executeFunction` that performs the API call to retrieve errors report data for the given masterId from BlazeMeter.
    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 errors report data const url = new URL(`${baseUrl}/api/v4/masters/${masterId}/reports/errorsreport/data`); // 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 errors report data.' }; } } };
  • The schema definition for the tool, including name, description, and input parameters schema (masterId required string).
    type: 'function', function: { name: 'get_test_run_errors_data', description: 'Get the errors report data for a specified test run (master).', parameters: { type: 'object', properties: { masterId: { type: 'string', description: 'The ID of the test run (master) to retrieve the errors report data for.' } }, required: ['masterId'] } } }
  • tools/paths.js:7-7 (registration)
    The tool is registered by including its relative path in the toolPaths array exported from paths.js, which is used by discoverTools() to dynamically import and load the tool.
    'blazemeter/new-collection/get-test-run-errors-data.js',
  • lib/tools.js:7-16 (registration)
    The discoverTools function dynamically imports and loads the apiTool from each path in toolPaths, making it available 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); }
  • mcpServer.js:80-80 (registration)
    In setupServerHandlers, the list of discovered tools is used to set up MCP handlers (ListTools and CallTool), effectively registering all tools including get_test_run_errors_data for use in the MCP server.
    }

Other Tools

Related 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