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}`);
        }
      },
    );

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