Skip to main content
Glama

Add a warehouse closure or opening

add_warehouse_closure

Changes data: adds a run of days to the warehouse calendar, as the person who connected this app, and records it in the organization's audit log. By default the days are a closure (stock-taking, an inventory week); with open: true they are days the warehouse works although its calendar says it is shut, such as a public holiday it works through. Closures move the collect_by dates of every shipment for everyone in the organization straight away, so use it only when the user asks to close or open the warehouse on given days, and say which days before calling. starts_on and ends_on are YYYY-MM-DD dates; omit ends_on for a single day. A run is at most 366 days. Without warehouse_id it changes the default warehouse. Answers with the closure and its id such as "wcl_9", which remove_warehouse_closure needs; get_warehouse lists the existing ones and shows the effect on the next delivery days. It is not idempotent: once it has answered, never call it again for the same days, since a retry adds a duplicate closure; check get_warehouse first if unsure.

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": {
      "starts_on": "<starts_on>"
    },
    "name": "add_warehouse_closure"
  }
}

Input Schema

NameRequiredDescriptionDefault
noteNoWhy, such as "Stock-taking".
openNoTrue when the warehouse is open on these days although its calendar says shut. Default false: closed.
ends_onNoLast day, YYYY-MM-DD, not before starts_on. Omit for a single day.
starts_onYesFirst day, YYYY-MM-DD.
warehouse_idNoA warehouse id such as "whs_12". Omit for the default warehouse.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.4/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=false, idempotentHint=false, destructiveHint=false, so a lower bar applies, yet the description still goes well beyond them: it says the change is recorded in the audit log, that it moves every shipment's `collect_by` dates for the whole organization immediately, that a run is capped at 366 days, and that retries create duplicate closures. That is arguably a 5; the deduction reflects that the annotation flag `destructiveHint=false` sits in tension with the description's warning that it mutates dates for everyone in the organization. The description is not contradictory so much as adding a caution the flag understates, so a 3 rather than 1 or 5.

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 consequence ('Changes data') and organized from effect to usage to parameters to return value. It is dense and every sentence carries information, but at roughly seven clauses it is close to overlong for a five-parameter tool.

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?

No output schema exists, and the description compensates by stating the return value ('the closure and its id such as "wcl_9"') and why the caller needs it. Combined with the permission context, mutation scope, and retry hazard, an agent has everything required to call it correctly.

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 baseline would be 3. The description adds real meaning on top: the 366-day cap on a run, the default-warehouse behavior when `warehouse_id` is omitted, and the YYYY-MM-DD / omit-`ends_on` convention. It does not add much on `note` beyond the schema's example, so it stops short of 5.

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 (adds a run of days to the warehouse calendar), and immediately distinguishes the two modes (closure by default vs. `open: true`). It also names the siblings that do adjacent jobs (`remove_warehouse_closure`, `get_warehouse`), so an agent can separate this from them without reading their schemas.

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

Usage Guidelines5/5

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

Explicit when-to-use: 'use it only when the user asks to close or open the warehouse on given days, and say which days before calling.' It also gives a pre-check alternative ('check get_warehouse first if unsure') and a hard when-not-to-retry rule, so the agent is told both what selects this tool and what to do instead.

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