Skip to main content
Glama
sieteunoseis

mcp-cisco-support

Progressive Bug Search

progressive_bug_search

Search Cisco bug reports using multiple strategies, handling version variations and product IDs to find relevant issues efficiently.

Instructions

Automatically tries multiple search strategies, starting specific and broadening scope if needed. Handles version normalization and product ID variations.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
primary_search_termYesPrimary search term (product name, model, or keyword)
versionNoSoftware version (will try multiple formats: 17.09.06 -> 17.09 -> 17)
severity_rangeNoSeverity range to search (will search each level separately)high
statusNoBug status filter

Implementation Reference

  • Main handler function that executes the progressive_bug_search tool. It generates multiple search variations for product IDs and versions, searches across severity levels, tracks progress, selects the best result, and returns it.
    private async executeProgressiveSearch(args: ToolArgs, meta?: { progressToken?: string }): Promise<BugApiResponse> {
      const primaryTerm = args.primary_search_term as string;
      const version = args.version as string;
      const severityRange = (args.severity_range as string) || 'high';
      const status = args.status as string;
    
      logger.info('Starting progressive search', { primaryTerm, version, severityRange });
    
      // Send initial progress
      const { sendProgress } = await import('../mcp-server.js');
    
      // Build search variations
      const searchVariations = [];
    
      // Try product ID approach first
      const productVariations = this.normalizeProductId(primaryTerm);
      for (const product of productVariations) {
        if (version) {
          const versionVariations = this.normalizeVersion(version);
          for (const v of versionVariations) {
            searchVariations.push({
              type: 'keyword',
              args: { keyword: `${product} ${v}`, status }
            });
          }
        }
        searchVariations.push({
          type: 'product_id',
          args: { base_pid: product, status }
        });
        searchVariations.push({
          type: 'keyword',
          args: { keyword: product, status }
        });
      }
    
      // Try searches with different severity levels based on range
      const severityLevels = severityRange === 'high' ? ['1', '2', '3'] :
                            severityRange === 'medium' ? ['3', '4'] :
                            ['1', '2', '3', '4', '5', '6'];
    
      const totalAttempts = searchVariations.length * severityLevels.length;
      let currentAttempt = 0;
      let bestResult: BugApiResponse = { bugs: [], total_results: 0, page_index: 1 };
    
      sendProgress(meta?.progressToken, 0, totalAttempts);
    
      for (const variation of searchVariations) {
        for (const severity of severityLevels) {
          currentAttempt++;
          sendProgress(meta?.progressToken, currentAttempt, totalAttempts);
    
          try {
            const searchArgs = { ...variation.args, severity };
            let result: BugApiResponse;
    
            if (variation.type === 'keyword') {
              result = await this.executeTool('search_bugs_by_keyword', searchArgs);
            } else {
              result = await this.executeTool('search_bugs_by_product_id', searchArgs);
            }
    
            if (result.bugs && result.bugs.length > bestResult.bugs!.length) {
              bestResult = result;
              logger.info('Found better result in progressive search', {
                variation: variation.type,
                args: searchArgs,
                resultCount: result.bugs.length
              });
            }
    
            // If we found results, we can be less aggressive about continuing
            if (result.bugs && result.bugs.length >= 5) {
              break;
            }
          } catch (error) {
            logger.warn('Progressive search variation failed', {
              variation,
              severity,
              error: error instanceof Error ? error.message : error
            });
          }
        }
    
        if (bestResult.bugs && bestResult.bugs.length >= 10) {
          // Send completion progress before breaking
          sendProgress(meta?.progressToken, totalAttempts, totalAttempts);
          break; // Good enough result found
        }
      }
    
      // Ensure final progress is sent
      sendProgress(meta?.progressToken, totalAttempts, totalAttempts);
    
      return bestResult;
    }
  • Input schema and metadata definition for the progressive_bug_search tool, including name, title, description, and validation schema.
      name: 'progressive_bug_search',
      title: 'Progressive Bug Search',
      description: 'Automatically tries multiple search strategies, starting specific and broadening scope if needed. Handles version normalization and product ID variations.',
      inputSchema: {
        type: 'object',
        properties: {
          primary_search_term: {
            type: 'string',
            description: 'Primary search term (product name, model, or keyword)'
          },
          version: {
            type: 'string',
            description: 'Software version (will try multiple formats: 17.09.06 -> 17.09 -> 17)'
          },
          severity_range: {
            type: 'string',
            description: 'Severity range to search (will search each level separately)',
            enum: ['high', 'medium', 'all'],
            default: 'high'
          },
          status: {
            type: 'string',
            description: 'Bug status filter',
            enum: ['O', 'F', 'T']
          }
        },
        required: ['primary_search_term']
      }
    },
  • Registration of progressive_bug_search as an exposed tool in the EnhancedAnalysisApi by including it in the filter list of tools from the parent BugApi.
      'smart_search_strategy',
      'progressive_bug_search', 
      'multi_severity_search',
      'comprehensive_analysis',
      'compare_software_versions',
      'product_name_resolver'
    ];
  • Dispatch/registration in the executeTool switch statement that routes calls to the progressive_bug_search handler.
    case 'progressive_bug_search':
      return this.executeProgressiveSearch(processedArgs, meta);
  • Helper function to generate multiple normalized version variations for progressive searching, used within executeProgressiveSearch.
    private normalizeVersion(version: string): string[] {
      const versions = [];
    
      // Convert to Cisco API format first: 17.09.06 -> 17.9.6 (remove leading zeros)
      const ciscoFormat = this.normalizeVersionString(version);
      versions.push(ciscoFormat);
    
      // Also keep original version in case it's already in correct format
      if (ciscoFormat !== version) {
        versions.push(version);
      }
    
      // Create abbreviated versions: 17.09.06 -> 17.09 -> 17.9
      if (version.includes('.')) {
        const parts = version.split('.');
        if (parts.length >= 3) {
          const shortVersion = parts.slice(0, 2).join('.');
          const shortCiscoFormat = this.normalizeVersionString(shortVersion);
          versions.push(shortCiscoFormat);
          if (shortCiscoFormat !== shortVersion) {
            versions.push(shortVersion);
          }
        }
        if (parts.length >= 2) {
          versions.push(parts[0]);
        }
      }
    
      // Remove duplicates and return
      return [...new Set(versions)];
    }
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It adds some context: it describes the progressive search strategy (starting specific and broadening) and mentions handling version normalization and product ID variations. However, it doesn't cover critical aspects like whether this is a read-only operation, potential rate limits, authentication needs, or what the output looks like (e.g., format, pagination).

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is highly concise and front-loaded: two sentences that efficiently convey the core functionality and key features. Every sentence earns its place by adding value, with no redundant or vague language.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity (progressive search with 4 parameters) and lack of annotations and output schema, the description is incomplete. It covers the search strategy and some parameter handling but misses behavioral details (e.g., safety, output format) and doesn't fully compensate for the absence of structured fields. It's adequate as a minimum viable description but has clear gaps.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema already documents all parameters thoroughly. The description adds minimal value beyond the schema: it implies that 'version' will be normalized (e.g., '17.09.06 -> 17.09 -> 17') and 'severity_range' will be searched separately, but these are already hinted in the schema descriptions. No additional syntax or format details are provided.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's function: 'Automatically tries multiple search strategies, starting specific and broadening scope if needed.' It specifies the verb (search) and resource (bugs), and mentions handling version normalization and product ID variations. However, it doesn't explicitly differentiate from sibling tools like 'multi_severity_search' or 'smart_search_strategy' that might have overlapping functionality.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage context by stating it 'tries multiple search strategies' and 'handles version normalization,' suggesting it's useful for broad or uncertain searches. However, it lacks explicit guidance on when to use this tool versus alternatives like 'search_bugs_by_keyword' or 'smart_search_strategy,' and doesn't mention any exclusions or prerequisites.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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