Skip to main content
Glama

business_newsvendor

Read-only

Newsvendor optimal order quantity — Single-period inventory decision (perishables, seasonal buys, event stock, print runs). price= and cost= per unit plus demand as mean= (Poisson) or mean= + sd= (normal) or history= past demand list (empirical). Optional salvage= value of leftovers, shortage_penalty= goodwill cost per lost sale, order= to grade your own quantity (NEAR_OPTIMAL/UNDER_ORDERING/OVER_ORDERING). Returns critical ratio, optimal order, safety stock, expected sales/leftover/lost sales, in-stock probability, fill rate, expected profit, value of optimizing vs ordering the mean, expected value of perfect information and a profit sensitivity table. Price: $0.002 USDC (Base, via x402).

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "price": "<price>",
      "cost": "<cost>",
      "mean": "<mean>"
    },
    "name": "business_newsvendor"
  }
}

Input Schema

NameRequiredDescriptionDefault
costYes4
meanYes100
priceYes10

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.5/5.0
Behavior5/5

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

Annotations only cover the read-only/non-destructive profile, and the description goes well beyond that: it discloses the paid access model ('$0.002 USDC (Base, via x402)') and enumerates the full return payload (critical ratio, safety stock, fill rate, EVPI, sensitivity table). For a paid, no-output-schema tool, that is exactly the context an agent needs before invoking.

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?

Front-loaded with the concept, then inputs, then outputs — a logical order with no filler sentences. The long parenthesized enumeration of return values is dense but each item is informative; only minor tightening is possible.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With three required parameters and no output schema, the definition covers the decision context, input encoding, optional modifiers, and the shape of results, so an agent can call it correctly. The gap is that several inputs it advertises (sd=, history=, salvage=, order=) are absent from the declared schema, so an agent cannot verify their exact names should the schema be authoritative.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema's per-parameter descriptions are just bare sample values ('4', '100', '10'), so the description carries real weight by defining units and roles: price= and cost= per unit, mean= as Poisson demand. It also documents optional inputs (sd=, history=, salvage=, shortage_penalty=, order=) that do not even appear in the supplied schema, which is helpful though it creates a mismatch with the declared 3-parameter surface.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

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

States a specific computational verb+object ('Newsvendor optimal order quantity') and immediately grounds it in concrete decision contexts — perishables, seasonal buys, event stock, print runs. An agent can distinguish this from cost/EOQ-style siblings without opening a schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Clearly indicates when this model applies (single-period, perishable/seasonal decisions) and explains how to select the demand form: mean= for Poisson, mean=+sd= for normal, history= for empirical. It also tells the agent to pass order= when it wants a quantity graded. It stops short of naming an explicit alternative (e.g. multi-period EOQ) or stating when not to use it.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources