Skip to main content
Glama
simplypixi

BugBug MCP Server

by simplypixi

get_tests

Retrieve and filter BugBug test automation cases with pagination, search queries, and sorting options to manage test suites effectively.

Instructions

Get list of BugBug tests

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
orderingNoSort order
pageNoPage number for pagination
pageSizeNoNumber of results per page
queryNoSearch query for test names

Implementation Reference

  • Handler function that fetches tests using bugbugClient.getTests, processes the response, and returns formatted markdown list of tests.
    handler: async ({ page, pageSize, query, ordering }) => {
        try {
    
          const response = await bugbugClient.getTests(page, pageSize, query, ordering);
          
          if (response.status !== 200) {
            return {
              content: [
                {
                  type: 'text',
                  text: `Error: ${response.status} ${response.statusText}`,
                },
              ],
            };
          }
    
          const { count, page: currentPage, results } = response.data;
          
          let testsList = '';
          if (results && results.length > 0) {
            testsList = results.map((test: BugBugTest) => 
              `- **${test.name}** (ID: ${test.id}) - Active: ${test.isActive ? 'Yes' : 'No'}${test.isRecording ? ' [RECORDING]' : ''}`
            ).join('\n');
          } else {
            testsList = 'No tests found.';
          }
          
          return {
            content: [
              {
                type: 'text',
                text: `**BugBug Tests** (Page ${currentPage || 1}, Total: ${count || 0}):\n\n${testsList}`,
              },
            ],
          };
        } catch (error) {
          return {
            content: [
              {
                type: 'text',
                text: `Error fetching tests: ${error instanceof Error ? error.message : 'Unknown error'}`,
              },
            ],
          };
        }
      }
  • Input schema using Zod for validating parameters: page, pageSize, query, ordering.
    inputSchema: z.object({
      page: z.number().optional().describe('Page number for pagination'),
      pageSize: z.number().optional().describe('Number of results per page'),
      query: z.string().optional().describe('Search query for test names'),
      ordering: z.enum(['name', '-name', 'created', '-created', 'last_result', '-last_result']).optional().describe('Sort order'),
    }).shape,
  • Registration of all tools, including getTestsTool (imported as testsTools), by spreading into a record and registering each with the MCP server.
    export function registerAllTools(server: McpServer): void {
      const tools: Record<string, Tool> = {
        ...configTools,
        ...testsTools,
        ...testRunsTools,
        ...suitesTools,
        ...suiteRunsTools,
        ...profilesTools,
        ...advancedTools,
      };
    
      for (const t in tools) {
        server.registerTool(
          tools[t].name,
          {
            description: tools[t].description,
            inputSchema: tools[t].inputSchema,
            annotations: { title: tools[t].title },
          },
          (args: unknown) => tools[t].handler(args as unknown)
        );
      }
    }
  • BugBug API client method to retrieve paginated list of tests, called by the tool handler.
    async getTests(page?: number, pageSize?: number, query?: string, ordering?: string): Promise<ApiResponse<PaginatedResponse<BugBugTest>>> {
      const params = new URLSearchParams();
      if (page) params.append('page', page.toString());
      if (pageSize) params.append('page_size', pageSize.toString());
      if (query) params.append('query', query);
      if (ordering) params.append('ordering', ordering);
      
      const queryString = params.toString() ? `?${params.toString()}` : '';
      return this.makeRequest(`/tests/${queryString}`);
    }
Behavior3/5

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

Annotations provide a title but no behavioral hints (e.g., readOnlyHint, destructiveHint). The description doesn't add behavioral context beyond the basic action—it doesn't mention pagination behavior, rate limits, authentication needs, or what 'BugBug tests' entail. However, it doesn't contradict annotations, and the schema covers parameters well, so it meets a minimal baseline.

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—'Get list of BugBug tests' is front-loaded and appropriately sized for a simple list-retrieval tool. Every word contributes to understanding the purpose without redundancy.

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's moderate complexity (4 parameters, no output schema, no annotations), the description is adequate but minimal. It covers the basic action but lacks context on output format, error handling, or integration with sibling tools, leaving gaps that could hinder optimal agent 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?

Schema description coverage is 100%, with clear parameter descriptions (e.g., 'Sort order', 'Page number for pagination'). The description adds no parameter-specific information beyond what the schema provides, so it meets the baseline score of 3 for high schema coverage without compensating value.

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 'list of BugBug tests', making the purpose understandable. However, it doesn't differentiate from sibling tools like 'get_test' (singular) or 'get_test_runs', which could cause confusion about when to use this specific list-retrieval tool versus alternatives.

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 like 'get_test' (for a single test) or 'get_test_runs' (for test runs). It lacks context about use cases, prerequisites, or exclusions, leaving the agent to infer usage from 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/simplypixi/bugbug-mcp-server'

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