Skip to main content
Glama

get_ingredient

Retrieve detailed ingredient and product information including inventory data and images using product ID from the Inflow Inventory system.

Instructions

Get detailed information about a specific ingredient/product

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
includeNoRelated entities to include (e.g., "inventoryLines,defaultImage")
productIdYesThe product ID (UUID)

Implementation Reference

  • index.js:85-105 (registration)
    Registration of the 'get_ingredient' tool, including input schema definition and execution wrapper that calls productHandlers.getProduct
    server.registerTool(
      'get_ingredient',
      {
        description: 'Get detailed information about a specific ingredient/product',
        inputSchema: {
          productId: z.string().describe('The product ID (UUID)'),
          include: z.string().optional().describe('Related entities to include (e.g., "inventoryLines,defaultImage")')
        }
      },
      async (args) => {
        const result = await productHandlers.getProduct(inflowClient, args);
        return {
          content: [
            {
              type: 'text',
              text: JSON.stringify(result, null, 2)
            }
          ]
        };
      }
    );
  • Handler function for get_ingredient tool: validates productId and delegates to InflowClient.getProduct
    async getProduct(client, args) {
      if (!args.productId) {
        return {
          success: false,
          error: 'productId is required'
        };
      }
    
      return await client.getProduct(args.productId, args.include);
    },
  • Core implementation of product retrieval: makes HTTP GET request to Inflow API endpoint /products/{productId} with optional includes and error handling
    async getProduct(productId, include = null) {
      try {
        const params = include ? `?include=${include}` : '';
        const response = await this.client.get(
          `/${this.config.companyId}/products/${productId}${params}`
        );
    
        return {
          success: true,
          data: response.data
        };
      } catch (error) {
        return this._handleError(error, 'getProduct');
      }
    }
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 action ('Get detailed information') but doesn't cover critical aspects like authentication needs, rate limits, error handling, or what 'detailed information' entails. This leaves significant gaps for an agent to understand the tool's 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 with zero waste. It's front-loaded with the core purpose and appropriately sized for a simple retrieval tool, making it easy to parse quickly.

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 (a read operation with 2 parameters) and lack of annotations and output schema, the description is incomplete. It doesn't explain the return format, error conditions, or behavioral traits, leaving the agent with insufficient context to use the tool 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?

The input schema has 100% description coverage, documenting both parameters clearly. The description adds no additional meaning beyond the schema, such as explaining the format of 'detailed information' or examples for the 'include' parameter. Baseline 3 is appropriate as the schema does the heavy lifting.

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 ('Get') and resource ('detailed information about a specific ingredient/product'), making the purpose understandable. However, it doesn't explicitly differentiate from siblings like 'list_ingredients' or 'search_ingredients', which might retrieve similar information in bulk or with filters.

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 such as 'list_ingredients' or 'search_ingredients'. It lacks context on prerequisites, exclusions, or specific scenarios where this tool is preferred, leaving usage ambiguous.

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