Skip to main content
Glama

Build Replenishment Plan

build_replenishment_plan

Build an Inventory Mission Control replenishment plan from Spark's canonical reorder detection. Returns grouped buy, transfer, manufacture and defer decisions with known-vs-unknown spend, MOQ adjustments, source freshness, blockers and stable fingerprints. Tenant, optional 3PL client pin, currency and owner come only from the connected credential. Requires Write scope. This is non-destructive: it persists only derived credential-owned session state for later get/reprice/commit and does not change inventory or create any order document. Draft evidence is short-lived (30 minutes by default; server configuration is authoritative).

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": {
      "request": "<request>"
    },
    "name": "build_replenishment_plan"
  }
}

Input Schema

NameRequiredDescriptionDefault
requestYesBounded mission constraints: 1-180 day horizon; optional warehouse, vendor and exact SKU filters; optional maxKnownSpend; forecast and unknown-cost policy; allowed actions.

Output Schema

NameRequiredDescriptionDefault
issuesNo
planIdNo
statusNo
summaryNo
revisionNo
createdAtNo
expiresAtNo
revisionIdNo
constraintsNo
schemaVersionNo
decisionGroupsNo
sourceObservedAtNo
sourceFingerprintNo
allowedNextActionsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedOutput schema / properties / decisionGroups / items / properties / lines / items / properties / metrics / properties / openManufacturingOrderDemand
      Added value: +{
      +  "type": [
      +    "number",
      +    "null"
      +  ]
      +}
  2. First observed

TDQS

A4.6/5.0
Behavior5/5

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

Annotations alone would leave the agent confused by readOnlyHint=false alongside destructiveHint=false; the description resolves this precisely by explaining it persists only derived credential-owned session state and changes no inventory nor creates any order document. It further discloses the draft TTL (30 minutes by default, server configuration authoritative) and that tenant/client pin/currency/owner are credential-derived, which is behavior an agent cannot see in the 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?

Front-loads the action and the returned artifact, then layers constraints, scope, safety and TTL in a logical order with no filler sentences. The single dense paragraph is information-rich but slightly hard to scan, which keeps it off a 5.

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

Completeness5/5

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

For a write-ish planning tool with a nested request object, the description covers what it produces, what it persists, what it does not mutate, the permission needed, and the lifetime of the result. Return values are additionally covered by an output schema, so nothing essential for correct invocation is missing.

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?

Schema coverage is 100%, so the nested request fields are already well documented and the baseline would be 3. The description adds real meaning beyond the schema by clarifying that tenant, optional 3PL client pin, currency and owner are not request parameters at all but come from the credential, preventing an agent from hunting for those fields.

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 verb and resource ('Build an Inventory Mission Control replenishment plan from Spark's canonical reorder detection') and then enumerates the concrete outputs (grouped buy/transfer/manufacture/defer decisions, spend, MOQ adjustments, source freshness, blockers, fingerprints). It also situates itself in the lifecycle ('for later get/reprice/commit'), which separates it from the get/reprice/commit/cancel siblings that share its prefix.

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?

The description makes the entry-point role clear by naming the downstream tools this draft feeds (get/reprice/commit) and states the access prerequisite ('Requires Write scope'). It does not explicitly state when *not* to use it, e.g. refresh an existing draft via reprice vs. building a new one, so an agent must infer that boundary from the sibling names.

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