Skip to main content
Glama

search_ingredients

Find ingredients by searching across name, description, SKU, and barcode to quickly locate products in inventory management systems.

Instructions

Search for ingredients using full-text search across name, description, SKU, and barcode

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
includeNoRelated entities to include
limitNoMaximum number of results (default: 25)
queryYesSearch query string

Implementation Reference

  • Implements the core logic of the 'search_ingredients' tool by performing a smart search via the InflowClient's listProducts method, with validation for required query parameter.
    async searchProducts(client, args) {
      if (!args.query) {
        return {
          success: false,
          error: 'query is required'
        };
      }
    
      return await client.listProducts({
        smart: args.query,
        limit: args.limit || 25,
        include: args.include
      });
    },
  • index.js:130-151 (registration)
    Registers the 'search_ingredients' tool with MCP server, including input schema definition and the wrapper handler that calls productHandlers.searchProducts.
    server.registerTool(
      'search_ingredients',
      {
        description: 'Search for ingredients using full-text search across name, description, SKU, and barcode',
        inputSchema: {
          query: z.string().describe('Search query string'),
          limit: z.number().optional().describe('Maximum number of results (default: 25)'),
          include: z.string().optional().describe('Related entities to include')
        }
      },
      async (args) => {
        const result = await productHandlers.searchProducts(inflowClient, args);
        return {
          content: [
            {
              type: 'text',
              text: JSON.stringify(result, null, 2)
            }
          ]
        };
      }
    );

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/intelligent-staffing-systems/mcp-inflow-ingredients'

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