product_name_resolver
Convert Cisco product IDs to full names and get search strategies for technical support. Resolves codes like ISR4431/K9 into searchable product information.
Instructions
Resolves product IDs to full product names and provides web search strategies. Helps convert technical product codes to searchable terms.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| product_id | Yes | Product ID to resolve (e.g., ISR4431/K9, WS-C2960-24TC-L) | |
| include_search_strategies | No | Include recommended web search strategies |
Implementation Reference
- src/apis/bug-api.ts:1342-1381 (handler)The main execution handler for the 'product_name_resolver' tool. It extracts arguments, calls WebSearchHelper.resolveProductName, adds search strategies, and formats the response.private async executeProductNameResolver(args: ToolArgs): Promise<BugApiResponse> { const productId = args.product_id as string; const includeSearchStrategies = (args.include_search_strategies as boolean) !== false; logger.info('Resolving product name', { productId }); try { const resolution = await WebSearchHelper.resolveProductName(productId); const result = { product_id: productId, resolution: resolution, search_strategies: includeSearchStrategies ? { lifecycle_queries: WebSearchHelper.generateLifecycleSearchQueries(productId), general_queries: [ `"${productId}" specifications site:cisco.com`, `"${productId}" datasheet site:cisco.com`, `"${productId}" installation guide site:cisco.com`, `"${productId}" configuration guide site:cisco.com` ] } : null }; return { bugs: [], total_results: 0, page_index: 1, product_resolution: result }; } catch (error) { logger.error('Product name resolution failed', { productId, error }); return { bugs: [], total_results: 0, page_index: 1, error: `Failed to resolve product name: ${error instanceof Error ? error.message : 'Unknown error'}` }; } }
- src/apis/bug-api.ts:609-628 (registration)Tool registration in BugApi.getTools(): defines the tool name, title, description, and input schema.{ name: 'product_name_resolver', title: 'Product Name Resolver', description: 'Resolves product IDs to full product names and provides web search strategies. Helps convert technical product codes to searchable terms.', inputSchema: { type: 'object', properties: { product_id: { type: 'string', description: 'Product ID to resolve (e.g., ISR4431/K9, WS-C2960-24TC-L)' }, include_search_strategies: { type: 'boolean', description: 'Include recommended web search strategies', default: true } }, required: ['product_id'] } }
- src/apis/bug-api.ts:714-716 (handler)Dispatch in executeTool switch statement that routes to the specific handler method.case 'product_name_resolver': return this.executeProductNameResolver(processedArgs);
- src/utils/web-search.ts:8-81 (helper)Core helper method implementing product name resolution logic via known mappings and pattern-based resolution.static async resolveProductName(productId: string): Promise<{ fullName: string | null; modelUrl: string | null; searchStrategy: string[]; }> { const result = { fullName: null as string | null, modelUrl: null as string | null, searchStrategy: [] as string[] }; try { logger.info('Attempting to resolve product name via web search', { productId }); // Strategy 1: Direct Cisco support search result.searchStrategy.push(`Web search for "${productId}" site:cisco.com/support`); // Strategy 2: Product specifications search result.searchStrategy.push(`Web search for "${productId} datasheet" site:cisco.com`); // Strategy 3: General Cisco search result.searchStrategy.push(`Web search for "Cisco ${productId}" official documentation`); // Known product mappings based on patterns const knownMappings = this.getKnownProductMappings(); const mapping = knownMappings[productId.toUpperCase()]; if (mapping) { result.fullName = mapping.fullName; result.modelUrl = mapping.modelUrl; result.searchStrategy.push('Resolved using known product mapping database'); logger.info('Product resolved via known mappings', { productId, fullName: result.fullName }); return result; } // Pattern-based resolution for ISR series if (productId.match(/^ISR44\d+/i)) { const model = productId.replace(/\/K9$/i, ''); result.fullName = `Cisco ${model} Integrated Services Router`; result.modelUrl = `https://www.cisco.com/c/en/us/support/routers/${model.toLowerCase()}-integrated-services-router-isr/model.html`; result.searchStrategy.push('Resolved using ISR series pattern matching'); logger.info('ISR product resolved via pattern matching', { productId, fullName: result.fullName }); return result; } // Pattern-based resolution for Catalyst switches if (productId.match(/^(WS-)?C\d+/i)) { const model = productId.replace(/^WS-/, '').replace(/\/K9$/i, ''); result.fullName = `Cisco Catalyst ${model} Switch`; result.searchStrategy.push('Resolved using Catalyst series pattern matching'); logger.info('Catalyst product resolved via pattern matching', { productId, fullName: result.fullName }); return result; } // Pattern-based resolution for ASR series if (productId.match(/^ASR\d+/i)) { const model = productId.replace(/\/K9$/i, ''); result.fullName = `Cisco ${model} Series Aggregation Services Router`; result.searchStrategy.push('Resolved using ASR series pattern matching'); logger.info('ASR product resolved via pattern matching', { productId, fullName: result.fullName }); return result; } logger.warn('Could not resolve product name', { productId }); return result; } catch (error) { logger.error('Web search resolution failed', { productId, error: error instanceof Error ? error.message : error }); return result; } }
- src/apis/enhanced-analysis-api.ts:18-26 (registration)Tool name included in the filter list for EnhancedAnalysisApi.getTools(), exposing it in the enhanced analysis subset.'smart_search_strategy', 'progressive_bug_search', 'multi_severity_search', 'comprehensive_analysis', 'compare_software_versions', 'product_name_resolver' ]; return allBugTools.filter(tool => enhancedAnalysisToolNames.includes(tool.name));