Skip to main content
Glama
musaceylan

PriceAtlas MCP Server

by musaceylan

search_products

Find food products by name using Open Food Facts data to support price tracking and comparison across international supermarket chains.

Instructions

Search for products by name. Returns matching products from Open Food Facts.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYesSearch query (min 2 characters)
limitNoMax results (1-20, default 10)

Implementation Reference

  • Implementation of the search_products MCP tool, including registration, input schema, and handler logic.
    server.tool(
      'search_products',
      'Search for products by name. Returns matching products from Open Food Facts.',
      {
        query: z.string().describe('Search query (min 2 characters)'),
        limit: z.number().min(1).max(20).default(10).describe('Max results (1-20, default 10)'),
      },
      async ({ query, limit }) => {
        try {
          const results = await api(`/api/search?q=${encodeURIComponent(query)}&limit=${limit}`);
          return text(results);
        } catch (e) {
          return errorResult(`Search failed: ${(e as Error).message}`);
        }
      },
    );
Behavior3/5

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

No annotations provided, so description carries full burden. Credits for disclosing external data source (Open Food Facts). However, lacks details on rate limits, latency expectations, or exact return structure that would fully compensate for missing annotations.

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, zero waste. First sentence defines the operation; second specifies return value and source. Perfectly front-loaded and dense.

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

Completeness4/5

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

Appropriate for a simple 2-parameter search tool. Mentions return value ('matching products') and data source despite lacking output schema. Sufficient for agent selection, though return structure details would elevate this further.

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 coverage is 100% (both params fully documented). Description adds semantic context that 'query' is specifically for product names, but does not elaborate beyond schema constraints (min 2 chars, range 1-20). Baseline 3 appropriate.

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?

States specific action (search), resource (products), and method (by name). The 'by name' clause helps distinguish from sibling 'lookup_product' (likely ID/barcode-based), though explicit differentiation from price-focused siblings (get_prices) is absent.

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?

Provides implied usage via 'by name' (use when searching by product name), but lacks explicit when-not-to-use guidance or contrasts with alternatives like 'lookup_product' for barcode lookups.

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/musaceylan/priceatlas-mcp'

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