Skip to main content
Glama

search_gpu

Search for graphics cards by chipset model, VRAM capacity, and price to find suitable GPUs for gaming, content creation, or AI workloads.

Instructions

Specialized graphics card (VGA) search tool. Find GPUs by chipset model, VRAM capacity, and price. Perfect for gaming builds, content creation, or AI workloads.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
chipsetNoGPU chipset model. NVIDIA examples: 'RTX 4090', 'RTX 4070', 'RTX 4060', 'RTX 3060'. AMD examples: 'RX 7900', 'RX 7600'. Intel: 'Arc B580', 'Arc B570'
memoryNoVideo memory (VRAM) capacity in GB. Common values: 8, 12, 16, 24. Example: 12 for 12GB VRAM cards suitable for 1440p gaming
sort_byNoPrice sorting order. 'price_asc' = cheapest first (value gaming), 'price_desc' = most expensive first (premium performance)
limitNoMaximum results to return. Valid range: 1-50, default: 10. Higher values show more brand/model variations

Implementation Reference

  • The main handler function that implements the logic for the 'search_gpu' tool. It filters products in the GPU category based on chipset, memory (VRAM), sorts by price if specified, limits results, and returns JSON-formatted results.
    private searchGPU(args: any) {
      const { chipset, memory, sort_by, limit = 10 } = args;
      const results: any[] = [];
    
      // Find GPU category
      const gpuCategory = this.productData.find(cat => 
        cat.category_name.includes('顯示卡') || cat.category_name.includes('VGA')
      );
    
      if (!gpuCategory) {
        return {
          content: [
            {
              type: "text",
              text: JSON.stringify({
                error: "GPU category not found",
                results: []
              }, null, 2),
            },
          ],
        };
      }
    
      // Search through all GPU subcategories
      for (const subcat of gpuCategory.subcategories) {
        for (const product of subcat.products) {
          let matches = true;
    
          // Filter by chipset if specified
          if (chipset && matches) {
            const chipsetLower = chipset.toLowerCase();
            const subcatLower = subcat.name.toLowerCase();
            const specsText = product.specs.join(' ').toLowerCase();
            const modelLower = product.model?.toLowerCase() || '';
            const rawTextLower = product.raw_text.toLowerCase();
            
            if (!subcatLower.includes(chipsetLower) && 
                !specsText.includes(chipsetLower) && 
                !modelLower.includes(chipsetLower) &&
                !rawTextLower.includes(chipsetLower)) {
              matches = false;
            }
          }
    
          // Filter by memory if specified
          if (memory && matches) {
            const memPattern = new RegExp(`${memory}G(?:B)?`, 'i');
            const specsText = product.specs.join(' ');
            const hasMemory = memPattern.test(specsText) || 
                             memPattern.test(product.raw_text) ||
                             memPattern.test(product.model || '');
            
            if (!hasMemory) {
              matches = false;
            }
          }
    
          if (matches) {
            results.push({
              ...product,
              category_name: gpuCategory.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: {
                chipset: chipset || "any",
                memory: memory || "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_gpu tool, including parameters for chipset, memory, sorting, and limit, along with description.
      name: "search_gpu",
      description: "Specialized graphics card (VGA) search tool. Find GPUs by chipset model, VRAM capacity, and price. Perfect for gaming builds, content creation, or AI workloads.",
      inputSchema: {
        type: "object",
        properties: {
          chipset: {
            type: "string",
            description: "GPU chipset model. NVIDIA examples: 'RTX 4090', 'RTX 4070', 'RTX 4060', 'RTX 3060'. AMD examples: 'RX 7900', 'RX 7600'. Intel: 'Arc B580', 'Arc B570'",
          },
          memory: {
            type: "number",
            description: "Video memory (VRAM) capacity in GB. Common values: 8, 12, 16, 24. Example: 12 for 12GB VRAM cards suitable for 1440p gaming",
          },
          sort_by: {
            type: "string",
            enum: ["price_asc", "price_desc"],
            description: "Price sorting order. 'price_asc' = cheapest first (value gaming), 'price_desc' = most expensive first (premium performance)",
          },
          limit: {
            type: "number",
            description: "Maximum results to return. Valid range: 1-50, default: 10. Higher values show more brand/model variations",
          },
        },
      },
    },
  • src/index.ts:309-310 (registration)
    The dispatch case in the CallToolRequestSchema handler that routes calls to the search_gpu tool to the searchGPU method.
    case "search_gpu":
      return this.searchGPU(args);
Behavior2/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 describes the tool as a 'search tool' which implies read-only behavior, but doesn't specify whether it queries a database, API, or local inventory, nor does it mention rate limits, authentication needs, or error handling. The description adds minimal behavioral context beyond the basic search function.

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 concise and front-loaded, stating the tool's purpose in the first sentence and adding context in the second. Both sentences earn their place by defining specialization and use cases, with no wasted words.

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?

For a search tool with 4 parameters, 100% schema coverage, and no output schema, the description is adequate but has gaps. It covers purpose and use cases but lacks details on behavioral aspects like data source, result format, or error conditions. Without annotations or output schema, more context would improve completeness.

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 input schema has 100% description coverage, providing detailed explanations for all parameters. The description adds value by mentioning the search criteria (chipset, VRAM, price) and use cases, but doesn't provide additional semantic context beyond what's in the schema. Baseline 3 is appropriate as the schema does the heavy lifting.

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 as a 'search tool' for 'graphics cards (VGA)' with specific search criteria (chipset, VRAM, price) and target use cases (gaming, content creation, AI). It distinguishes from siblings like 'search_cpu' or 'search_products' by specializing in GPUs, though it doesn't explicitly contrast with 'search_products' which might also handle GPUs.

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 ('Perfect for gaming builds, content creation, or AI workloads') but doesn't explicitly state when to use this tool versus alternatives like 'search_products' or 'get_product_by_model'. It provides general scenarios but lacks specific guidance on tool selection among siblings.

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