Skip to main content
Glama
pbandreddy

BlazeMeter MCP Server

by pbandreddy

get_workspaces

Retrieve available workspaces from a specified BlazeMeter account to organize and manage performance testing projects.

Instructions

Get workspaces from a specified account.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
accountIdNoThe ID of the account to retrieve workspaces from.

Implementation Reference

  • The handler function 'executeFunction' that fetches the list of workspaces from the BlazeMeter API for a given account ID.
    const executeFunction = async ({ accountId } = {}) => {
      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
      const resolvedAccountId = accountId || process.env.BZM_ACCOUNT_ID;
    
      try {
        // Construct the URL with query parameters
        const url = new URL(`${baseUrl}/api/v4/workspaces`);
        url.searchParams.append('accountId', resolvedAccountId);
    
        // 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 workspaces.' };
        }
      }
    };
  • The JSON schema definition for the 'get_workspaces' tool, including input parameters.
      type: 'function',
      function: {
        name: 'get_workspaces',
        description: 'Get workspaces from a specified account.',
        parameters: {
          type: 'object',
          properties: {
            accountId: {
              type: 'string',
              description: 'The ID of the account to retrieve workspaces from.'
            }
          },
          required: []
        }
      }
    }
  • The apiTool object that bundles the handler and schema, exported for discovery.
    const apiTool = {
      function: executeFunction,
      definition: {
        type: 'function',
        function: {
          name: 'get_workspaces',
          description: 'Get workspaces from a specified account.',
          parameters: {
            type: 'object',
            properties: {
              accountId: {
                type: 'string',
                description: 'The ID of the account to retrieve workspaces from.'
              }
            },
            required: []
          }
        }
      }
    };
    
    export { apiTool };
  • tools/paths.js:2-2 (registration)
    The tool file path is listed in toolPaths array for dynamic import during tool discovery.
    'blazemeter/new-collection/get-workspace-list.js',
  • lib/tools.js:7-16 (registration)
    The discoverTools function dynamically imports apiTool from each path and collects them into an array of 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);
    }
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 states it 'gets' workspaces, implying a read operation, but doesn't clarify permissions needed, rate limits, pagination, or what happens if the accountId is invalid. This leaves significant gaps for a tool with no annotation coverage.

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 with zero waste. It's appropriately sized and front-loaded, clearly stating the tool's purpose without unnecessary elaboration.

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 no annotations, no output schema, and a simple parameter, the description is incomplete. It doesn't address behavioral aspects like error handling, return format, or usage context, which are needed for the agent to invoke it correctly beyond basic syntax.

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 documents the 'accountId' parameter. The description adds no additional meaning beyond implying retrieval from an account, which aligns with the schema. Baseline 3 is appropriate when the schema does the heavy lifting.

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 ('workspaces'), specifying it retrieves them from a specified account. It distinguishes from siblings like 'get_projects' by focusing on workspaces, but doesn't explicitly differentiate beyond the resource name.

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?

No guidance is provided on when to use this tool versus alternatives. The description doesn't mention prerequisites, context, or exclusions, leaving the agent to infer usage based on the tool name alone.

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