Skip to main content
Glama
pbandreddy

BlazeMeter MCP Server

by pbandreddy

get_projects

Retrieve performance testing projects from a BlazeMeter workspace to manage and analyze test configurations and results.

Instructions

Get projects from a specified workspace.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
workspaceIdNoThe ID of the workspace to retrieve projects from.

Implementation Reference

  • The handler function that executes the logic to fetch projects from the BlazeMeter API using the workspaceId parameter or environment variable.
    const executeFunction = async ({ workspaceId } = {}) => {
      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 resolvedWorkspaceId = workspaceId || process.env.BZM_WORKSPACE_ID;
    
      try {
        // Construct the URL with query parameters
        const url = new URL(`${baseUrl}/api/v4/projects`);
        url.searchParams.append('workspaceId', resolvedWorkspaceId);
    
        // 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 projects.' };
        }
      }
    };
  • The tool registration object `apiTool` that defines the tool name 'get_projects', its schema (parameters), description, and links to the handler function. Exported for use in MCP tool registration.
    const apiTool = {
      function: executeFunction,
      definition: {
        type: 'function',
        function: {
          name: 'get_projects',
          description: 'Get projects from a specified workspace.',
          parameters: {
            type: 'object',
            properties: {
              workspaceId: {
                type: 'string',
                description: 'The ID of the workspace to retrieve projects from.'
              }
            },
            required: []
          }
        }
      }
    };
    
    export { apiTool }; 
  • The input schema defining the optional 'workspaceId' parameter for the get_projects tool.
      parameters: {
        type: 'object',
        properties: {
          workspaceId: {
            type: 'string',
            description: 'The ID of the workspace to retrieve projects from.'
          }
        },
        required: []
      }
    }
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. It states it 'gets' projects, implying a read-only operation, but doesn't disclose behavioral traits like whether it requires authentication, returns paginated results, includes all project fields, or has rate limits. The description is minimal and lacks crucial operational context.

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, clear sentence with zero waste. It's appropriately sized and front-loaded, directly 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 the lack of annotations and output schema, the description is incomplete. It doesn't explain what 'projects' entail (e.g., structure, fields), how results are returned, or error conditions. For a tool with no structured behavioral hints, this minimal description leaves significant gaps for an AI agent.

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 schema description coverage is 100%, with the single parameter 'workspaceId' fully documented in the schema. The description adds no additional meaning beyond the schema, such as explaining what happens if workspaceId is omitted (since it's not required) or providing examples of valid workspace IDs.

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 projects') and the resource ('from a specified workspace'), providing a specific verb+resource combination. However, it doesn't differentiate from sibling tools like 'get_workspaces' or 'get_test_runs' which might retrieve different resources or have different scopes.

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. It doesn't mention prerequisites, exclusions, or compare it to sibling tools like 'get_workspaces' (which might list workspaces) or 'get_test_runs' (which might retrieve test-related data).

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