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)
            }
          ]
        };
      }
    );
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It mentions 'full-text search' but doesn't cover key aspects like whether the search is case-sensitive, how results are ranked, if there's pagination or rate limiting, or what the output format is. For a search tool with zero annotation coverage, this leaves significant gaps in understanding its behavior.

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 ingredients using full-text search') and specifies the search scope. There's no wasted language or redundancy, making it highly concise and well-structured for quick comprehension.

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 the tool's complexity as a search function with no annotations and no output schema, the description is incomplete. It doesn't explain the return values, result ordering, or error handling, which are critical for an agent to use the tool effectively. The description alone is insufficient for full contextual understanding.

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?

The description adds minimal value beyond the input schema, which has 100% coverage. It implies the 'query' parameter is used for full-text search across multiple fields, but doesn't provide additional details like search syntax or examples. With high schema coverage, the baseline is 3, as the schema already documents parameters adequately, and the description doesn't compensate with extra insights.

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 tool's purpose: 'Search for ingredients using full-text search across name, description, SKU, and barcode.' It specifies the verb ('search'), resource ('ingredients'), and scope ('full-text search across name, description, SKU, and barcode'), which is specific and actionable. However, it doesn't explicitly distinguish from sibling tools like 'list_ingredients' or 'get_ingredient', which could have overlapping functionality, so it doesn't achieve the highest score.

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?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention sibling tools like 'list_ingredients' or 'get_ingredient', nor does it specify contexts where full-text search is preferred over other methods. This lack of comparative usage information leaves the agent without clear direction on tool selection.

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

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