Skip to main content
Glama

create_ingredient

Add new ingredients or products to Inflow inventory system by providing product details like name, SKU, and description for inventory management.

Instructions

Create a new ingredient/product in Inflow inventory

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
additionalFieldsNoAny additional product fields
descriptionNoProduct description
isActiveNoActive status (default: true)
nameYesProduct name
productIdYesUUID for the new product (generate with crypto.randomUUID())
skuNoSKU code

Implementation Reference

  • Main handler function for creating an ingredient/product. Validates required fields (productId, name), constructs the product object, and delegates to InflowClient.upsertProduct for the API call.
    async createProduct(client, args) {
      if (!args.productId) {
        return {
          success: false,
          error: 'productId is required (generate a UUID)'
        };
      }
    
      if (!args.name) {
        return {
          success: false,
          error: 'name is required'
        };
      }
    
      const product = {
        productId: args.productId,
        name: args.name,
        sku: args.sku,
        description: args.description,
        isActive: args.isActive !== undefined ? args.isActive : true,
        ...args.additionalFields
      };
    
      return await client.upsertProduct(product);
    },
  • Zod input schema defining parameters for the create_ingredient tool: productId (required UUID), name (required), and optional fields like sku, description, isActive, additionalFields.
    inputSchema: {
      productId: z.string().describe('UUID for the new product (generate with crypto.randomUUID())'),
      name: z.string().describe('Product name'),
      sku: z.string().optional().describe('SKU code'),
      description: z.string().optional().describe('Product description'),
      isActive: z.boolean().optional().describe('Active status (default: true)'),
      additionalFields: z.record(z.any()).optional().describe('Any additional product fields')
    }
  • index.js:154-178 (registration)
    Registers the 'create_ingredient' MCP tool with the server, providing description, input schema, and a thin async handler that calls productHandlers.createProduct and formats the response.
    server.registerTool(
      'create_ingredient',
      {
        description: 'Create a new ingredient/product in Inflow inventory',
        inputSchema: {
          productId: z.string().describe('UUID for the new product (generate with crypto.randomUUID())'),
          name: z.string().describe('Product name'),
          sku: z.string().optional().describe('SKU code'),
          description: z.string().optional().describe('Product description'),
          isActive: z.boolean().optional().describe('Active status (default: true)'),
          additionalFields: z.record(z.any()).optional().describe('Any additional product fields')
        }
      },
      async (args) => {
        const result = await productHandlers.createProduct(inflowClient, args);
        return {
          content: [
            {
              type: 'text',
              text: JSON.stringify(result, null, 2)
            }
          ]
        };
      }
    );
  • Supporting utility in InflowClient that performs the HTTP PUT request to the Inflow API endpoint for creating or updating a product/ingredient, with error handling.
    async upsertProduct(product) {
      try {
        if (!product.productId) {
          return {
            success: false,
            error: 'productId is required for upsert'
          };
        }
    
        const response = await this.client.put(
          `/${this.config.companyId}/products`,
          product
        );
    
        return {
          success: true,
          data: response.data
        };
      } catch (error) {
        return this._handleError(error, 'upsertProduct');
      }
    }
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 creation but fails to detail critical aspects like required permissions, whether the operation is idempotent, error handling, or response format. This leaves significant gaps for a mutation tool.

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 directly states the tool's purpose without unnecessary words. It is front-loaded and appropriately sized for its content.

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?

For a creation tool with no annotations and no output schema, the description is incomplete. It lacks information on behavioral traits (e.g., permissions, side effects), response format, and error handling, which are essential for effective tool use in this context.

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 description coverage is 100%, so the schema fully documents all parameters. The description does not add any semantic details beyond what the schema provides, such as explaining relationships between parameters or usage examples. Baseline 3 is appropriate when the schema handles parameter documentation.

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 action ('Create') and resource ('new ingredient/product in Inflow inventory'), making the purpose unambiguous. However, it does not explicitly differentiate from sibling tools like 'update_ingredient' or 'list_ingredients', which would be needed for a score of 5.

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 'update_ingredient' or 'list_ingredients', nor does it mention prerequisites like authentication or context. It only states what the tool does, without usage context.

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