Skip to main content
Glama
wspotter

MCP Art Supply Store

by wspotter

search_products

Find art supplies by name, category, or supplier to get detailed product information for inventory management and customer service.

Instructions

Search for products by name, category, or supplier. Returns detailed product information.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
filterByNoOptional: category, supplier, or price_range
queryYesSearch term

Implementation Reference

  • Executes the search_products tool by filtering the mock inventory data based on the query parameter and formatting a response with matching products including SKU, price, category, stock, and supplier.
    case 'search_products': {
      const query = String(args?.query || '').toLowerCase();
      const filterBy = args?.filterBy ? String(args.filterBy) : null;
      
      let results = storeData.inventory.filter(item =>
        item.name.toLowerCase().includes(query) ||
        item.category.toLowerCase().includes(query)
      );
      
      return {
        content: [{
          type: 'text',
          text: `Found ${results.length} product(s):\n\n${results.map(item =>
            `📦 ${item.name}\n- SKU: ${item.id} | Price: $${item.price}\n- Category: ${item.category} | Stock: ${item.quantity}\n- Supplier: ${item.supplier}`
          ).join('\n\n')}`
        }]
      };
    }
  • Defines the input schema for the search_products tool, specifying a required 'query' string and optional 'filterBy' parameter.
    {
      name: 'search_products',
      description: 'Search for products by name, category, or supplier. Returns detailed product information.',
      inputSchema: {
        type: 'object',
        properties: {
          query: { type: 'string', description: 'Search term' },
          filterBy: { type: 'string', description: 'Optional: category, supplier, or price_range' },
        },
        required: ['query'],
      },
    },
  • src/index.ts:516-518 (registration)
    Registers the listTools handler which returns the array of all tools including search_products.
    server.setRequestHandler(ListToolsRequestSchema, async () => {
      return { tools };
    });
  • src/dashboard.ts:38-38 (registration)
    Mock registration of search_products tool in the dashboard's toolsData for UI display.
    { name: 'search_products', description: 'Search product catalog', category: 'Inventory Management' },
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 states the tool returns 'detailed product information', which gives some output context, but lacks details on permissions, rate limits, pagination, or error handling. This is inadequate for a search tool with zero 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?

The description is a single, efficient sentence that front-loads the core functionality ('Search for products') and includes key details without waste. Every part earns its place by specifying search criteria and return information.

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

Completeness2/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 is incomplete. It lacks behavioral details like authentication needs or result format, and doesn't compensate for the absence of structured fields. For a search tool with two parameters, this leaves significant gaps in understanding how to use it effectively.

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 both parameters fully. The description adds minimal value by listing search criteria ('name, category, or supplier'), which partially aligns with the 'filterBy' parameter, but doesn't provide additional syntax or format details beyond the schema.

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 verb ('Search for') and resource ('products'), and specifies search criteria ('by name, category, or supplier'). It distinguishes from siblings like 'check_inventory' or 'get_best_sellers' by focusing on search functionality, though it doesn't explicitly differentiate them.

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

Usage Guidelines2/5

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

No guidance is provided on when to use this tool versus alternatives like 'check_inventory' or 'get_best_sellers'. The description mentions search criteria but doesn't specify contexts, prerequisites, or exclusions for usage.

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/wspotter/mcpart'

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