Skip to main content
Glama

multi_severity_search

Search Cisco bug reports across multiple severity levels simultaneously, combining results with severity breakdown counts. Automatically falls back to keyword search when product ID searches return no results for comprehensive coverage.

Instructions

RECOMMENDED for multi-severity searches: Automatically searches multiple severity levels and combines results with severity breakdown counts. Use this when you need "severity 3 or higher", "high severity bugs", or any range of severities. Handles the API limitation that requires separate calls for each severity level. SMART FALLBACK: When product_id search returns no results, automatically falls back to keyword search for better coverage (regardless of whether version is provided).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
search_termYesSearch term (keyword or product identifier). For keyword searches, limited to 50 characters. Long product series names will be automatically shortened.
search_typeYesType of search to perform. Use "product_series" for full product names like "Cisco 4000 Series Integrated Services Routers". For product IDs like "ISR4431", use "product_id" which will automatically fallback to keyword search if needed.
max_severityNoMaximum severity level to include (1=highest, 6=lowest)
versionNoSoftware version to search for (e.g., "15.0", "14.0", "17.9.6"). Will be automatically included in keyword search terms and used for product_series searches as affected_releases. Optional for product_id searches (fallback to keyword happens with or without version).

Implementation Reference

  • Primary handler for multi_severity_search tool. Determines search type (keyword, product_id, product_series), handles smart fallback from product_id to keyword if no results, incorporates version into searches, shortens long keywords to meet API limits, defines search function for each severity, and delegates to searchMultipleSeverities helper.
    private async executeMultiSeveritySearch(args: ToolArgs, meta?: { progressToken?: string }): Promise<BugApiResponse> { const searchTerm = args.search_term as string; const searchType = args.search_type as string; const maxSeverity = (args.max_severity as number) || 3; const version = args.version as string | undefined; const additionalParams = (args.additional_params as Record<string, any>) || {}; // If version is provided, enhance search parameters if (version) { // For product_series searches, use version as affected_releases if not already specified if (searchType === 'product_series' && !additionalParams.affected_releases && !additionalParams.fixed_releases) { additionalParams.affected_releases = version; } } logger.info('Starting multi-severity search', { searchTerm, searchType, maxSeverity, version }); const searchFunc = async (severity: string): Promise<BugApiResponse> => { const searchArgs = { severity, ...additionalParams }; switch (searchType) { case 'keyword': // Handle keyword length limitation (50 characters max) let keywordTerm = searchTerm; // Include version in keyword search if provided if (version) { keywordTerm = `${searchTerm} ${version}`; } if (keywordTerm.length > 50) { // For long product series names, extract key terms if (searchTerm.toLowerCase().includes('4000 series')) { keywordTerm = version ? `ISR4000 ${version}` : 'ISR4000'; } else if (searchTerm.toLowerCase().includes('catalyst 9200')) { keywordTerm = version ? `Catalyst 9200 ${version}` : 'Catalyst 9200'; } else if (searchTerm.toLowerCase().includes('asr 1000')) { keywordTerm = version ? `ASR1000 ${version}` : 'ASR1000'; } else if (searchTerm.toLowerCase().includes('callmanager') || searchTerm.toLowerCase().includes('unified communications manager')) { keywordTerm = version ? `CallManager ${version}` : 'CallManager'; } else { // Generic shortening: take first 47 chars + '...' keywordTerm = keywordTerm.substring(0, 47) + '...'; } logger.info('Shortened keyword search term', { original: version ? `${searchTerm} ${version}` : searchTerm, shortened: keywordTerm, reason: 'Keyword search 50-character limit' }); } return await this.executeTool('search_bugs_by_keyword', { keyword: keywordTerm, ...searchArgs }); case 'product_id': // Try product_id search first const productIdResult = await this.executeTool('search_bugs_by_product_id', { base_pid: searchTerm, ...searchArgs }); // If product_id search returns no results, always fallback to keyword search if (!productIdResult.bugs || productIdResult.bugs.length === 0) { logger.info('Product ID search returned no results, falling back to keyword search', { searchTerm, version: version || 'none', severity }); // Include version in keyword search if provided let keywordTerm = version ? `${searchTerm} ${version}` : searchTerm; if (keywordTerm.length > 50) { keywordTerm = keywordTerm.substring(0, 47) + '...'; } return await this.executeTool('search_bugs_by_keyword', { keyword: keywordTerm, ...searchArgs }); } return productIdResult; case 'product_series': const affectedReleases = additionalParams.affected_releases || (version ? version : undefined); const fixedReleases = additionalParams.fixed_releases; if (!affectedReleases && !fixedReleases) { throw new Error('product_series search requires a version parameter or affected_releases/fixed_releases'); } const toolName = fixedReleases ? 'search_bugs_by_product_series_fixed' : 'search_bugs_by_product_series_affected'; const releaseParam = fixedReleases || affectedReleases; return await this.executeTool(toolName, { product_series: searchTerm, [fixedReleases ? 'fixed_releases' : 'affected_releases']: releaseParam, ...searchArgs }); default: throw new Error(`Unsupported search type: ${searchType}`); } }; return await this.searchMultipleSeverities(searchFunc, maxSeverity, meta); }
  • Key helper function that iterates over severity levels 1 to max_severity, executes the provided search function for each, combines all bugs with deduplication by bug_id, tracks per-severity counts, sends progress updates, handles individual failures gracefully, and returns aggregated results with severity_breakdown.
    private async searchMultipleSeverities(searchFunc: (severity: string) => Promise<BugApiResponse>, maxSeverity: number = 3, meta?: { progressToken?: string }): Promise<BugApiResponse> { const allBugs: any[] = []; let totalResults = 0; const severityCounts: Record<string, number> = {}; logger.info('Starting multi-severity search', { maxSeverity }); for (let severity = 1; severity <= maxSeverity; severity++) { try { // Send progress notification before searching this severity const { sendProgress } = await import('../mcp-server.js'); sendProgress(meta?.progressToken, severity - 1, maxSeverity); logger.info(`Searching severity ${severity}`); const result = await searchFunc(severity.toString()); if (result.bugs && Array.isArray(result.bugs)) { const count = result.bugs.length; severityCounts[severity.toString()] = count; allBugs.push(...result.bugs); totalResults += result.total_results || result.bugs.length; logger.info(`Found ${count} bugs at severity ${severity}`); } else { severityCounts[severity.toString()] = 0; } } catch (error) { logger.warn(`Search failed for severity ${severity}`, { error: error instanceof Error ? error.message : error }); severityCounts[severity.toString()] = 0; // Continue with other severities } } // Remove duplicates by bug_id const uniqueBugs = allBugs.filter((bug, index, self) => index === self.findIndex(b => b.bug_id === bug.bug_id) ); logger.info('Multi-severity search completed', { totalFound: uniqueBugs.length, searchedSeverities: maxSeverity, severityCounts }); return { bugs: uniqueBugs, total_results: uniqueBugs.length, page_index: 1, severity_breakdown: severityCounts }; }
  • Defines the tool metadata, title, description, and inputSchema for parameter validation including search_term, search_type (keyword/product_id/product_series), max_severity, and optional version.
    name: 'multi_severity_search', title: 'Multi-Severity Search', description: 'RECOMMENDED for multi-severity searches: Automatically searches multiple severity levels and combines results with severity breakdown counts. Use this when you need "severity 3 or higher", "high severity bugs", or any range of severities. Handles the API limitation that requires separate calls for each severity level. SMART FALLBACK: When product_id search returns no results, automatically falls back to keyword search for better coverage (regardless of whether version is provided).', inputSchema: { type: 'object', properties: { search_term: { type: 'string', description: 'Search term (keyword or product identifier). For keyword searches, limited to 50 characters. Long product series names will be automatically shortened.' }, search_type: { type: 'string', description: 'Type of search to perform. Use "product_series" for full product names like "Cisco 4000 Series Integrated Services Routers". For product IDs like "ISR4431", use "product_id" which will automatically fallback to keyword search if needed.', enum: ['keyword', 'product_id', 'product_series'] }, max_severity: { type: 'integer', description: 'Maximum severity level to include (1=highest, 6=lowest)', default: 3, minimum: 1, maximum: 6 }, version: { type: 'string', description: 'Software version to search for (e.g., "15.0", "14.0", "17.9.6"). Will be automatically included in keyword search terms and used for product_series searches as affected_releases. Optional for product_id searches (fallback to keyword happens with or without version).' } }, required: ['search_term', 'search_type'] } },
  • Registers multi_severity_search as one of the exposed enhanced analysis tools by including it in the filter list from parent BugApi.getTools().
    '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