Skip to main content
Glama

smart_search_strategy

Analyzes search queries to suggest optimal approaches for finding Cisco bugs based on patterns and context, providing strategic guidance for effective bug discovery.

Instructions

Analyzes search queries and suggests optimal search approaches based on input patterns. Provides strategic guidance for finding bugs effectively.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
query_descriptionYesDescribe what you want to search for (e.g., "ISR4431 version 17.09.06 high severity bugs")
search_contextNoContext for the search (incident, upgrade planning, maintenance, security review)

Implementation Reference

  • The handler function generateSearchStrategy analyzes the user query description and search context to generate an optimal search strategy recommendation. It detects product patterns (e.g., ISR44), version patterns, severity requirements, and provides context-specific advice. Returns a structured search_strategy object with recommendations, parameters, tips, and advice.
    private async generateSearchStrategy(args: ToolArgs): Promise<BugApiResponse> { const queryDescription = args.query_description as string; const searchContext = (args.search_context as string) || 'general'; // Analyze the query and generate strategy const strategy = this.analyzeSearchQuery(queryDescription, searchContext); return { bugs: [], total_results: 0, page_index: 1, search_strategy: strategy }; } private analyzeSearchQuery(query: string, context: string): any { const strategy = { recommended_approach: [] as string[], search_parameters: {} as Record<string, any>, tips: [] as string[], context_specific_advice: [] as string[] }; const lowerQuery = query.toLowerCase(); // Detect product patterns if (lowerQuery.includes('isr44')) { strategy.recommended_approach.push('Use progressive_bug_search with primary_search_term="ISR4400"'); strategy.search_parameters.product_variations = ['ISR4431/K9', 'ISR4431', 'ISR4400', 'ISR']; strategy.tips.push('ISR4431 variations: Try ISR4400 series search if exact model fails'); } // Detect version patterns const versionMatch = query.match(/(\d+\.\d+\.\d+)/); if (versionMatch) { const fullVersion = versionMatch[1]; const shortVersion = fullVersion.split('.').slice(0, 2).join('.'); strategy.recommended_approach.push(`Try version variations: ${fullVersion} -> ${shortVersion}`); strategy.search_parameters.version_variations = [fullVersion, shortVersion]; strategy.tips.push('Version searching: Start with full version, then try abbreviated (17.09.06 -> 17.09)'); } // Detect severity patterns if (lowerQuery.includes('high severity') || lowerQuery.includes('critical')) { strategy.recommended_approach.push('Use multi_severity_search with max_severity=3'); strategy.search_parameters.severity_strategy = 'Search severities 1, 2, 3 separately and combine'; strategy.tips.push('Severity limitation: API only accepts single values - search each severity individually'); } // Context-specific advice switch (context) { case 'incident': strategy.context_specific_advice = [ 'Focus on open bugs (status=O) with high severity', 'Search for specific error messages or symptoms', 'Check both current and recent software versions', 'Look for workarounds in bug descriptions' ]; break; case 'upgrade_planning': strategy.context_specific_advice = [ 'Search fixed bugs in target version', 'Check for new bugs introduced in target version', 'Review upgrade-blocking issues', 'Consider end-of-life status of current version' ]; break; case 'security_review': strategy.context_specific_advice = [ 'Focus on security-related keywords: CVE, DoS, authentication', 'Check recent security advisories', 'Review high-severity security bugs', 'Look for patches and mitigation strategies' ]; break; } // General search effectiveness tips strategy.tips.push( 'Start specific, then broaden: exact model -> series -> general', 'Try partial version strings for better coverage', 'Use keyword search for symptoms, product search for hardware', 'Combine bug database with web search for complete picture' ); return strategy; }
  • Input schema definition for the smart_search_strategy tool in BugApi.getTools().
    name: 'smart_search_strategy', title: 'Smart Search Strategy Advisor', description: 'Analyzes search queries and suggests optimal search approaches based on input patterns. Provides strategic guidance for finding bugs effectively.', inputSchema: { type: 'object', properties: { query_description: { type: 'string', description: 'Describe what you want to search for (e.g., "ISR4431 version 17.09.06 high severity bugs")' }, search_context: { type: 'string', description: 'Context for the search (incident, upgrade planning, maintenance, security review)', enum: ['incident', 'upgrade_planning', 'maintenance', 'security_review', 'general'] } }, required: ['query_description'] } },
  • Registration of BugApi instance in ApiRegistry, which provides the smart_search_strategy tool via getAvailableTools().
    this.apis.set('bug', new BugApi()); this.apis.set('case', new CaseApi()); this.apis.set('eox', new EoxApi()); this.apis.set('psirt', new PsirtApi()); this.apis.set('product', new ProductApi()); this.apis.set('software', new SoftwareApi()); this.apis.set('serial', new SerialApi()); this.apis.set('rma', new RmaApi()); this.apis.set('enhanced_analysis', new EnhancedAnalysisApi()); this.apis.set('smart_bonding', new SmartBondingApi() as any); // Cast needed due to different base class
  • Explicit inclusion of smart_search_strategy in the filtered tool list for EnhancedAnalysisApi.getTools().
    const enhancedAnalysisToolNames = [ '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));

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/sieteunoseis/mcp-cisco-support'

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