Skip to main content
Glama

list_stock_adjustments

Retrieve inventory stock adjustments with filtering options to track and analyze inventory changes, modifications, and corrections in your ingredient management system.

Instructions

List stock adjustments with optional filters

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
adjustmentNumberNoFilter by adjustment number
includeNoRelated entities to include
limitNoMaximum number of results (default: 50)

Implementation Reference

  • Handler function that processes input arguments, builds query options, and delegates to the InflowClient's listStockAdjustments method to fetch stock adjustments.
    async listStockAdjustments(client, args) {
      const options = {
        adjustmentNumber: args.adjustmentNumber,
        include: args.include,
        limit: args.limit || 50
      };
    
      return await client.listStockAdjustments(options);
    },
  • index.js:238-258 (registration)
    MCP tool registration for 'list_stock_adjustments', including input schema definition using Zod and a thin async handler that calls the inventory handler and formats the response.
    server.registerTool(
      'list_stock_adjustments',
      {
        description: 'List stock adjustments with optional filters',
        inputSchema: {
          adjustmentNumber: z.string().optional().describe('Filter by adjustment number'),
          include: z.string().optional().describe('Related entities to include'),
          limit: z.number().optional().describe('Maximum number of results (default: 50)')
        }
      },
      async (args) => {
        const result = await inventoryHandlers.listStockAdjustments(inflowClient, args);
        return {
          content: [
            {
              type: 'text',
              text: JSON.stringify(result, null, 2)
            }
          ]
        };
      }
  • Core API client method that performs the HTTP GET request to the Inflow Inventory API endpoint for listing stock adjustments, constructs query parameters, handles the response, and manages errors.
    async listStockAdjustments(options = {}) {
      try {
        const params = new URLSearchParams();
    
        if (options.adjustmentNumber) params.append('filter[adjustmentNumber]', options.adjustmentNumber);
        if (options.include) params.append('include', options.include);
        if (options.limit) params.append('limit', options.limit.toString());
    
        const response = await this.client.get(
          `/${this.config.companyId}/stock-adjustments?${params.toString()}`
        );
    
        return {
          success: true,
          data: response.data
        };
      } catch (error) {
        return this._handleError(error, 'listStockAdjustments');
      }
    }
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 only states the tool lists with filters, missing critical details like whether it's read-only (implied but not explicit), pagination behavior (only mentions a default limit), error handling, or authentication needs. This is inadequate for a tool with parameters and no output schema.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that front-loads the core action ('list stock adjustments') and adds key detail ('with optional filters'). There's no wasted text, making it appropriately sized for a basic tool. However, it could be more structured by explicitly mentioning the resource scope or sibling differentiation.

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 has 3 parameters, no annotations, and no output schema, the description is incomplete. It doesn't explain what 'stock adjustments' entail, how results are returned (e.g., list format, pagination beyond limit), or behavioral traits like safety or rate limits. For a listing tool with filtering, more context is needed to guide the agent 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, so parameters are documented in the schema (e.g., 'adjustmentNumber' filters by number, 'include' adds related entities, 'limit' sets max results). The description adds no additional meaning beyond stating 'optional filters', which is already implied by the schema. 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.

Purpose3/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states the tool lists stock adjustments with optional filters, which provides a basic purpose. However, it's vague about what 'stock adjustments' specifically are (e.g., inventory changes, corrections) and doesn't distinguish from siblings like 'get_stock_adjustment' (singular vs. plural). It uses a clear verb ('list') but lacks specificity in resource scope.

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?

No guidance is provided on when to use this tool versus alternatives. It mentions optional filters but doesn't specify scenarios for using this over 'get_stock_adjustment' (for single adjustments) or 'search_ingredients' (for related searches). There's no mention of prerequisites, exclusions, or typical use cases, leaving the agent to infer usage.

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