Skip to main content
Glama

get_product_by_model

Retrieve detailed specifications, pricing, and availability for computer components by entering the exact model number.

Instructions

Get detailed specifications and pricing for a specific product by exact model number. Use when you know the exact product model and need full details including specs, current price, and availability markers.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
modelYesExact product model number (case-insensitive). Examples: 'i5-14400F', 'RTX 4060', 'B650M-PLUS', 'WD_BLACK SN770'. Must match exactly as listed

Implementation Reference

  • The main handler function that implements the tool logic: extracts the model from args, searches through all product categories, subcategories, and products for an exact case-insensitive model match, and returns the full product details including price, specs, and markers in JSON format, or a 'not found' response.
    private getProductByModel(args: any) {
      const { model } = args;
    
      for (const cat of this.productData) {
        for (const subcat of cat.subcategories) {
          for (const product of subcat.products) {
            if (product.model.toLowerCase() === model.toLowerCase()) {
              return {
                content: [
                  {
                    type: "text",
                    text: JSON.stringify({
                      found: true,
                      product: {
                        brand: product.brand,
                        model: product.model,
                        specs: product.specs,
                        price: product.price,
                        original_price: product.original_price,
                        discount_amount: product.discount_amount,
                        category: cat.category_name,
                        subcategory: subcat.name,
                        markers: product.markers,
                        raw_text: product.raw_text,
                      },
                    }, null, 2),
                  },
                ],
              };
            }
          }
        }
      }
    
      return {
        content: [
          {
            type: "text",
            text: JSON.stringify({
              found: false,
              message: `Product with model "${model}" not found`,
            }, null, 2),
          },
        ],
      };
    }
  • Defines the input schema for the tool: requires a single 'model' string parameter with description of expected format.
    inputSchema: {
      type: "object",
      properties: {
        model: {
          type: "string",
          description: "Exact product model number (case-insensitive). Examples: 'i5-14400F', 'RTX 4060', 'B650M-PLUS', 'WD_BLACK SN770'. Must match exactly as listed",
        },
      },
      required: ["model"],
    },
  • src/index.ts:253-266 (registration)
    Registers the tool in the list_tools response, including name, description, and input schema for client discovery.
    {
      name: "get_product_by_model",
      description: "Get detailed specifications and pricing for a specific product by exact model number. Use when you know the exact product model and need full details including specs, current price, and availability markers.",
      inputSchema: {
        type: "object",
        properties: {
          model: {
            type: "string",
            description: "Exact product model number (case-insensitive). Examples: 'i5-14400F', 'RTX 4060', 'B650M-PLUS', 'WD_BLACK SN770'. Must match exactly as listed",
          },
        },
        required: ["model"],
      },
    },
  • src/index.ts:317-318 (registration)
    Registers the tool handler in the call_tool request switch statement, dispatching to the getProductByModel method.
    case "get_product_by_model":
      return this.getProductByModel(args);
Behavior3/5

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

No annotations are provided, so the description carries full burden. It mentions 'detailed specifications and pricing' and 'availability markers', giving some behavioral context about return content. However, it doesn't disclose error handling for invalid models, rate limits, authentication needs, or response format details, leaving gaps for a tool with no annotation coverage.

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?

Two sentences with zero waste: the first states purpose and input requirement, the second provides usage guidelines. Each sentence earns its place by adding distinct value, and the description is appropriately sized and front-loaded.

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 no annotations and no output schema, the description partially compensates by outlining return content (specs, price, availability). However, for a tool with 100% schema coverage but no structured output definition, it should ideally specify response structure or error cases more explicitly to be fully complete.

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 fully documents the single 'model' parameter with examples and matching rules. The description adds marginal value by reinforcing 'exact model number' but doesn't provide additional syntax or format details beyond what the schema specifies.

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

Purpose5/5

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

The description clearly states the verb 'Get' and resource 'detailed specifications and pricing for a specific product by exact model number', specifying the exact input requirement. It distinguishes from siblings by emphasizing 'exact model number' retrieval rather than category listing or search operations.

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

Usage Guidelines5/5

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

Explicitly states 'Use when you know the exact product model and need full details including specs, current price, and availability markers', providing clear when-to-use guidance. It implicitly distinguishes from sibling tools (e.g., search_* tools) by requiring exact model matching rather than keyword searches.

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