Skip to main content
Glama

search_ssd

Search for solid-state drives by interface type, capacity, and price to find storage solutions for OS and data needs.

Instructions

Specialized SSD/solid-state drive search tool. Find storage drives by interface type, capacity, and price. Covers M.2 NVMe, SATA, and PCIe drives for OS and data storage.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
interfaceNoStorage interface/connection type. Options: 'M.2' (compact, fast), 'NVMe' (PCIe-based, fastest), 'SATA' (2.5", compatible), 'PCIe' (add-in card). 'M.2 NVMe' for modern builds
capacityNoStorage capacity in GB. Common values: 256, 512, 1000 (1TB), 2000 (2TB), 4000 (4TB). Example: 1000 for 1TB drives
sort_byNoPrice sorting order. 'price_asc' = value drives first, 'price_desc' = premium/high-performance drives first
limitNoMaximum results to return. Valid range: 1-50, default: 10. More results show various brands/speeds

Implementation Reference

  • The handler function that implements the search_ssd tool logic. It filters SSD products from the product data based on interface type (e.g., M.2, NVMe), capacity (in GB, handles TB conversion), sorting by price, and limit. Searches category, subcategory names, specs, and raw text. Returns JSON-formatted results with total found, filters applied, and limited results.
    private searchSSD(args: any) {
      const { interface: interfaceType, capacity, sort_by, limit = 10 } = args;
      const results: any[] = [];
    
      // Find SSD category
      const ssdCategory = this.productData.find(cat => 
        cat.category_name.includes('SSD') || cat.category_name.includes('固態硬碟')
      );
    
      if (!ssdCategory) {
        return {
          content: [
            {
              type: "text",
              text: JSON.stringify({
                error: "SSD category not found",
                results: []
              }, null, 2),
            },
          ],
        };
      }
    
      // Search through all SSD subcategories
      for (const subcat of ssdCategory.subcategories) {
        for (const product of subcat.products) {
          let matches = true;
    
          // Filter by interface if specified
          if (interfaceType && matches) {
            const interfaceLower = interfaceType.toLowerCase();
            const subcatLower = subcat.name.toLowerCase();
            const specsText = product.specs.join(' ').toLowerCase();
            const rawTextLower = product.raw_text.toLowerCase();
            
            if (!subcatLower.includes(interfaceLower) && 
                !specsText.includes(interfaceLower) && 
                !rawTextLower.includes(interfaceLower)) {
              matches = false;
            }
          }
    
          // Filter by capacity if specified
          if (capacity && matches) {
            // Handle both GB and TB
            const capPatternGB = new RegExp(`${capacity}GB`, 'i');
            const capPatternTB = new RegExp(`${capacity / 1000}TB`, 'i');
            const specsText = product.specs.join(' ');
            const hasCapacity = capPatternGB.test(specsText) || 
                               capPatternGB.test(product.raw_text) ||
                               capPatternGB.test(product.model || '') ||
                               (capacity >= 1000 && (capPatternTB.test(specsText) || 
                                                     capPatternTB.test(product.raw_text) ||
                                                     capPatternTB.test(product.model || '')));
            
            if (!hasCapacity) {
              matches = false;
            }
          }
    
          if (matches) {
            results.push({
              ...product,
              category_name: ssdCategory.category_name,
              subcategory_name: subcat.name,
            });
          }
        }
      }
    
      // Sort results
      if (sort_by === 'price_asc') {
        results.sort((a, b) => a.price - b.price);
      } else if (sort_by === 'price_desc') {
        results.sort((a, b) => b.price - a.price);
      }
    
      // Apply limit
      const limitedResults = results.slice(0, limit);
    
      return {
        content: [
          {
            type: "text",
            text: JSON.stringify({
              total_found: results.length,
              showing: limitedResults.length,
              filters: {
                interface: interfaceType || "any",
                capacity: capacity || "any",
                sort_by: sort_by || "none"
              },
              results: limitedResults.map(p => ({
                brand: p.brand,
                model: p.model,
                specs: p.specs,
                price: p.price,
                original_price: p.original_price,
                discount_amount: p.discount_amount,
                subcategory: p.subcategory_name,
                markers: p.markers,
              })),
            }, null, 2),
          },
        ],
      };
    }
  • The input schema definition for the search_ssd tool, including properties for interface, capacity, sort_by, and limit, as returned in the ListTools response.
    {
      name: "search_ssd",
      description: "Specialized SSD/solid-state drive search tool. Find storage drives by interface type, capacity, and price. Covers M.2 NVMe, SATA, and PCIe drives for OS and data storage.",
      inputSchema: {
        type: "object",
        properties: {
          interface: {
            type: "string",
            description: "Storage interface/connection type. Options: 'M.2' (compact, fast), 'NVMe' (PCIe-based, fastest), 'SATA' (2.5\", compatible), 'PCIe' (add-in card). 'M.2 NVMe' for modern builds",
          },
          capacity: {
            type: "number",
            description: "Storage capacity in GB. Common values: 256, 512, 1000 (1TB), 2000 (2TB), 4000 (4TB). Example: 1000 for 1TB drives",
          },
          sort_by: {
            type: "string",
            enum: ["price_asc", "price_desc"],
            description: "Price sorting order. 'price_asc' = value drives first, 'price_desc' = premium/high-performance drives first",
          },
          limit: {
            type: "number",
            description: "Maximum results to return. Valid range: 1-50, default: 10. More results show various brands/speeds",
          },
        },
      },
    },
  • src/index.ts:313-314 (registration)
    The switch case in the CallToolRequestSchema handler that routes calls to the search_ssd tool to the searchSSD method.
    case "search_ssd":
      return this.searchSSD(args);
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It mentions the tool is for 'search' and 'find' operations, implying read-only behavior, but doesn't specify if it's safe, requires authentication, has rate limits, or what the output format looks like (e.g., list of products with details). For a search tool with zero annotation coverage, this leaves significant gaps in understanding its behavior and constraints.

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

Conciseness4/5

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

The description is appropriately sized with two sentences: the first states the purpose and key parameters, and the second adds context about drive types and usage. It's front-loaded with essential information and avoids redundancy. However, the second sentence could be slightly more concise by integrating 'for OS and data storage' more smoothly.

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 (search with 4 parameters), no annotations, and no output schema, the description is moderately complete. It covers the purpose and basic parameters but lacks details on behavioral traits (e.g., safety, output format) and doesn't fully compensate for the absence of structured data. For a search tool, it's adequate but has clear gaps in providing a holistic understanding.

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?

The schema description coverage is 100%, meaning all parameters are well-documented in the input schema. The description adds minimal value beyond the schema by mentioning 'interface type, capacity, and price' as search criteria, but doesn't provide additional syntax, format details, or examples not already covered. With high schema coverage, the baseline score of 3 is appropriate as the description doesn't significantly enhance parameter understanding.

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 purpose: 'Specialized SSD/solid-state drive search tool. Find storage drives by interface type, capacity, and price.' It specifies the resource (SSDs) and key search parameters, distinguishing it from general search tools like 'search_products' by focusing on SSDs. However, it doesn't explicitly differentiate from 'search_cpu' or 'search_gpu' beyond mentioning SSD-specific attributes.

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: 'Covers M.2 NVMe, SATA, and PCIe drives for OS and data storage,' suggesting it's for finding storage drives in computing builds. It doesn't provide explicit when-to-use guidance versus alternatives like 'search_products' (general) or 'get_product_by_model' (specific), nor does it mention exclusions or prerequisites. The context is clear but lacks sibling differentiation.

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/shyuan/coolpc-mcp-server'

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