get_ip_addresses
Retrieve BugBug infrastructure IP addresses for configuring firewall rules or network access controls.
Instructions
Get list of BugBug infrastructure IP addresses
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "get_ip_addresses"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/tools/config.ts:10-45 (handler)The main handler function for the 'get_ip_addresses' tool. It calls the BugBug API client to fetch IP addresses, formats the response as a markdown list, and handles errors by returning structured content blocks.
handler: async () => { try { const response = await bugbugClient.getIpAddresses(); if (response.status !== 200) { return { content: [ { type: 'text', text: `Error: ${response.status} ${response.statusText}`, }, ], }; } const ipList = response.data.map((ip: string) => `- ${ip}`).join('\n'); return { content: [ { type: 'text', text: `**BugBug Infrastructure IP Addresses:**\n\n${ipList}`, }, ], }; } catch (error) { return { content: [ { type: 'text', text: `Error fetching IP addresses: ${error instanceof Error ? error.message : 'Unknown error'}`, }, ], }; } } - src/tools/config.ts:9-9 (schema)Input schema for the 'get_ip_addresses' tool, defined as an empty object using Zod (no input parameters required).
inputSchema: z.object({}).shape, - src/tools/index.ts:11-33 (registration)Registration of all tools on the MCP server, including 'get_ip_addresses' via spreading configTools (which exports getIpAddressesTool).
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) ); } } - src/services/bugbugClient.ts:136-138 (helper)Helper method in BugBugApiClient class that performs the actual API request to fetch the list of IP addresses from the '/config/ips/' endpoint.
async getIpAddresses(): Promise<ApiResponse<string[]>> { return this.makeRequest<string[]>('/config/ips/'); }