get_bug_details
Retrieve detailed information for specific Cisco bug IDs to analyze issues and implement solutions. Input up to 5 comma-separated bug IDs to access comprehensive bug data.
Instructions
Get details for up to 5 specific bug IDs
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| bug_ids | Yes | Comma-separated list of bug IDs (max 5) |
Implementation Reference
- src/apis/bug-api.ts:656-658 (handler)Specific handler case in BugApi.executeTool that constructs the Cisco Bug API endpoint `/bugs/bug_ids/{bug_ids}` for retrieving details of specified bug IDs.case 'get_bug_details': endpoint = `/bugs/bug_ids/${encodeURIComponent(processedArgs.bug_ids)}`; break;
- src/apis/base-api.ts:19-103 (handler)Core HTTP client implementation in BaseApi.makeApiCall that executes the API request to Cisco Bug Search service with authentication, query params, timeout handling (60s), and automatic token refresh on 401.protected async makeApiCall(endpoint: string, params: Record<string, any> = {}): Promise<ApiResponse> { const token = await getValidToken(); // Build query string const queryParams = new URLSearchParams(); Object.entries(params).forEach(([key, value]) => { if (value !== undefined && value !== null && value !== '') { queryParams.append(key, String(value)); } }); const queryString = queryParams.toString(); const url = `${this.baseUrl}${endpoint}${queryString ? '?' + queryString : ''}`; try { logger.info(`Making ${this.apiName} API call`, { endpoint, params, fullUrl: url, queryString: queryString || '(none)' }); const controller = new AbortController(); const timeoutId = setTimeout(() => controller.abort(), 60000); // 60 second timeout const response = await fetch(url, { method: 'GET', headers: { 'Authorization': `Bearer ${token}`, 'Accept': 'application/json', 'User-Agent': 'mcp-cisco-support/1.0' }, signal: controller.signal }); clearTimeout(timeoutId); if (response.status === 401) { logger.warn('Received 401, token may be expired, refreshing...'); // Token expired, refresh and retry once const newToken = await getValidToken(); const retryController = new AbortController(); const retryTimeoutId = setTimeout(() => retryController.abort(), 60000); // 60 second timeout const retryResponse = await fetch(url, { method: 'GET', headers: { 'Authorization': `Bearer ${newToken}`, 'Accept': 'application/json', 'User-Agent': 'mcp-cisco-support/1.0' }, signal: retryController.signal }); clearTimeout(retryTimeoutId); if (!retryResponse.ok) { const errorText = await retryResponse.text(); throw new Error(`${this.apiName} API call failed after token refresh: ${retryResponse.status} ${retryResponse.statusText} - ${errorText}`); } const retryData = await retryResponse.json() as ApiResponse; return retryData; } if (!response.ok) { const errorText = await response.text(); logger.error(`${this.apiName} API call failed`, { status: response.status, statusText: response.statusText, url: url, params: params, errorText: errorText.substring(0, 500) }); throw new Error(`${this.apiName} API call failed: ${response.status} ${response.statusText} - URL: ${url} - ${errorText}`); } const data = await response.json() as ApiResponse; logger.info(`${this.apiName} API call successful`, { endpoint, resultCount: this.getResultCount(data) }); return data; } catch (error) {
- src/apis/bug-api.ts:136-150 (schema)Tool schema definition in BugApi.getTools(): defines name, description, and input validation requiring 'bug_ids' as comma-separated string.{ name: 'get_bug_details', title: 'Get Bug Details', description: 'Get details for up to 5 specific bug IDs', inputSchema: { type: 'object', properties: { bug_ids: { type: 'string', description: 'Comma-separated list of bug IDs (max 5)' } }, required: ['bug_ids'] } },
- src/apis/index.ts:102-102 (registration)Registers BugApi instance in ApiRegistry.apis map under 'bug' key, making its tools (including get_bug_details) available.this.apis.set('bug', new BugApi());
- src/mcp-server.ts:498-498 (registration)Initializes the global apiRegistry instance used by MCP server for tool listing and execution.apiRegistry = createApiRegistry(server);