Skip to main content
Glama

Create Warehouse

create_warehouse

Create a warehouse (name + unique code required; type defaults to internal). Runs the canonical creation path: duplicate-name/code check, a default receiving location, and a companion store (same name as the warehouse, returned in stores[] with its own storeId — that storeId, never the warehouse id, is what sales-order import surfaces take). Pass customFields to set tenant-defined custom field values (see list_custom_fields with entity=warehouse); an unknown fieldName fails the call. Use for multi-warehouse tenants during onboarding — single-warehouse tenants already have Main from signup. Requires an operator (unpinned) org token.

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": {
      "name": "<name>",
      "code": "<code>"
    },
    "name": "create_warehouse"
  }
}

Input Schema

NameRequiredDescriptionDefault
codeYesShort warehouse code (required, unique per tenant, e.g. 'EAST').
nameYesWarehouse display name (required, unique per tenant).
typeNointernal (Spark-managed stock, default) or external (observed-only, e.g. a 3PL/marketplace node).
descriptionNoOptional description.
customFieldsNoCustom field values keyed by fieldName (see list_custom_fields, entity=warehouse). list fields take an option id or name; multilist an array of them. An unknown fieldName fails the call.

Output Schema

NameRequiredDescriptionDefault
idNo
codeNo
nameNo
typeNo
storesNo
descriptionNo
customFieldsNo
replenishmentModeNo
supplyTransitDaysNo
supplyWarehouseIdNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.2/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=false, destructiveHint=false, idempotentHint=false, openWorldHint=false, and the description adds real value beyond them: duplicate-name/code rejection, the default receiving location and companion store side effects, and the operator (unpinned) org token requirement. However, the cross-references it supplies (customFields semantics, unknown fieldName failure) largely duplicate schema text, and with annotations this rich the description is additive but not carrying the full behavioral burden.

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 core action and requirements, then layered with side effects and auth before the optional customFields note. It is dense and readable but the stacked parentheticals and em-dash clauses make it longer than strictly necessary 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?

Covers required inputs, optional custom field behavior, side effects (receiving location, companion store), failure modes (duplicate, unknown fieldName), and the auth scope — everything needed to invoke a non-idempotent create. An output schema exists for stores[], and the description still gives the one non-obvious return detail an agent must act on.

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?

Schema description coverage is 100%, so all five parameters are already documented, including type's internal/external default and customFields' list/multilist handling. The description's parameter content (type default, customFields keyed by fieldName, unknown fieldName fails) restates the schema rather than adding new meaning, so baseline 3 applies.

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 ("Create a warehouse") and immediately characterizes the creation path it runs: duplicate check, default receiving location, companion store. It also disambiguates the resulting identifiers by noting that the companion store's storeId, not the warehouse id, is what sales-order import surfaces consume.

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?

Gives an explicit when-to-use (multi-warehouse tenants during onboarding) and an explicit when-not (single-warehouse tenants already have Main from signup). It also routes the agent to list_custom_fields with entity=warehouse for discovering valid custom field names before passing customFields.

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