Skip to main content
Glama

get_profiles

Retrieve a paginated list of test run profiles from the BugBug test automation platform to manage and execute automated testing configurations.

Instructions

Get list of BugBug run profiles

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pageNoPage number for pagination
pageSizeNoNumber of results per page

Implementation Reference

  • Full tool definition including handler function that executes the get_profiles tool logic by calling the BugBug API client and formatting the paginated list of profiles.
    export const getProfilesTool: Tool = { name: 'get_profiles', title: 'Get list of BugBug run profiles', description: 'Get list of BugBug run profiles', inputSchema: z.object({ page: z.number().optional().describe('Page number for pagination'), pageSize: z.number().optional().describe('Number of results per page'), }).shape, handler: async ({ page, pageSize }) => { try { const response = await bugbugClient.getProfiles(page, pageSize); if (response.status !== 200) { return { content: [ { type: 'text', text: `Error: ${response.status} ${response.statusText}`, }, ], }; } const { count, page: currentPage, results } = response.data; let profilesList = ''; if (results && results.length > 0) { profilesList = results.map((profile: BugBugProfile) => `- **${profile.name}** (ID: ${profile.id})${profile.isDefault ? ' [DEFAULT]' : ''}` ).join('\n'); } else { profilesList = 'No profiles found.'; } return { content: [ { type: 'text', text: `**BugBug Run Profiles** (Page ${currentPage || 1}, Total: ${count || 0}):\n\n${profilesList}`, }, ], }; } catch (error) { return { content: [ { type: 'text', text: `Error fetching profiles: ${error instanceof Error ? error.message : 'Unknown error'}`, }, ], }; } } };
  • Zod input schema defining optional pagination parameters for the get_profiles tool.
    inputSchema: z.object({ page: z.number().optional().describe('Page number for pagination'), pageSize: z.number().optional().describe('Number of results per page'), }).shape,
  • Registration function that imports and registers all tools, including get_profiles from profiles.ts, 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 that makes the HTTP request to fetch paginated profiles, used by the tool handler.
    async getProfiles(page?: number, pageSize?: number): Promise<ApiResponse<PaginatedResponse<BugBugProfile>>> { const params = new URLSearchParams(); if (page) params.append('page', page.toString()); if (pageSize) params.append('page_size', pageSize.toString()); const query = params.toString() ? `?${params.toString()}` : ''; return this.makeRequest(`/profiles/${query}`); }

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