Skip to main content
Glama

update_ingredient

Modify existing ingredient details in Inflow inventory including name, SKU, description, status, and custom fields using the product ID.

Instructions

Update an existing ingredient/product in Inflow inventory

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
additionalFieldsNoAny additional fields to update
descriptionNoNew description
isActiveNoActive status
nameNoNew product name
productIdYesThe product ID to update
skuNoNew SKU code

Implementation Reference

  • Handler function updateProduct that constructs the update payload from args and delegates to InflowClient.upsertProduct for the actual API update.
    async updateProduct(client, args) {
      if (!args.productId) {
        return {
          success: false,
          error: 'productId is required'
        };
      }
    
      // Build update object with only provided fields
      const updates = {
        productId: args.productId
      };
    
      if (args.name !== undefined) updates.name = args.name;
      if (args.sku !== undefined) updates.sku = args.sku;
      if (args.description !== undefined) updates.description = args.description;
      if (args.isActive !== undefined) updates.isActive = args.isActive;
    
      // Merge any additional fields
      if (args.additionalFields) {
        Object.assign(updates, args.additionalFields);
      }
    
      return await client.upsertProduct(updates);
    }
  • index.js:181-205 (registration)
    Registration of the 'update_ingredient' MCP tool, including input schema and handler invocation.
    server.registerTool(
      'update_ingredient',
      {
        description: 'Update an existing ingredient/product in Inflow inventory',
        inputSchema: {
          productId: z.string().describe('The product ID to update'),
          name: z.string().optional().describe('New product name'),
          sku: z.string().optional().describe('New SKU code'),
          description: z.string().optional().describe('New description'),
          isActive: z.boolean().optional().describe('Active status'),
          additionalFields: z.record(z.any()).optional().describe('Any additional fields to update')
        }
      },
      async (args) => {
        const result = await productHandlers.updateProduct(inflowClient, args);
        return {
          content: [
            {
              type: 'text',
              text: JSON.stringify(result, null, 2)
            }
          ]
        };
      }
    );
  • Core API implementation in InflowClient.upsertProduct that sends PUT request to /products endpoint to update the ingredient/product.
    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');
      }
    }
  • Zod input schema defining parameters for the update_ingredient tool.
      productId: z.string().describe('The product ID to update'),
      name: z.string().optional().describe('New product name'),
      sku: z.string().optional().describe('New SKU code'),
      description: z.string().optional().describe('New description'),
      isActive: z.boolean().optional().describe('Active status'),
      additionalFields: z.record(z.any()).optional().describe('Any additional fields to update')
    }
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 this is an update operation, implying mutation, but doesn't mention permissions required, whether changes are reversible, potential side effects (e.g., on inventory data), or rate limits. This is inadequate for a mutation tool with zero annotation coverage.

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's front-loaded with the core action and resource, making it easy to scan and understand 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 (6 parameters, mutation operation) and lack of annotations and output schema, the description is insufficient. It doesn't explain what happens on success or failure, what fields can be updated, or how it interacts with sibling tools. For a mutation tool in an inventory context, more behavioral and contextual details are needed.

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, so parameters are well-documented in the schema itself. The description adds no specific parameter information beyond implying an update action, which the schema already covers through parameter names and descriptions. This meets the baseline for high schema coverage.

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 ('Update') and target resource ('existing ingredient/product in Inflow inventory'), making the purpose immediately understandable. However, it doesn't distinguish this tool from its sibling 'create_ingredient' beyond the update vs. create distinction, missing an opportunity to clarify the specific update context versus creation.

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 like 'create_ingredient' or 'get_ingredient'. It mentions updating an existing ingredient but doesn't specify prerequisites (e.g., needing a valid productId) or exclusions (e.g., not for creating new items), leaving usage context vague.

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