Skip to main content
Glama

Pre-allocate boxes to a customer

create_preallocation

Changes data: sets boxes of one packing line aside for a customer, as the person who connected this app, and records it in the organization's audit log. Use it only when the user asks to pre-allocate, reserve or set aside boxes, and say what you are about to allocate (line, boxes, customer, price) before calling it. Get the packing_line_id and its available_boxes from list_preallocations first: a line cannot be allocated beyond its box count. Each call makes a new pre-allocation, so do not repeat a call that succeeded; to change one use update_preallocation. Answers with the pre-allocation and its id.

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": {
      "packing_line_id": "<packing_line_id>",
      "boxes": "<boxes>"
    },
    "name": "create_preallocation"
  }
}

Input Schema

NameRequiredDescriptionDefault
boxesYesHow many boxes to set aside.
currencyNoISO 4217 code such as "EUR". Required with unit_price.
allocateeNoThe customer the boxes are for, such as "Acme BV". Reuse the spelling list_preallocations shows.
unit_priceNoThe tentative price, per box unless price_basis is "total". A number, or a string such as "12.50".
price_basisNo"box" (default) when unit_price is per box, "total" when it is the total for these boxes.box
packing_line_idYesA packing line id such as "pln_5521", as returned by list_preallocations.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.9/5.0
Behavior5/5

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

Beyond the annotations, it discloses that the action runs as the connecting user and is written to the organization's audit log, and it states the hard capacity constraint that a line cannot be allocated beyond its box count. It also explains the return ('answers with the pre-allocation and its id'), which no output schema provides.

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

Conciseness5/5

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

Five tight sentences, front-loaded with the mutation warning, then the usage condition, the prerequisite, the repeat-call warning, and the return shape. No sentence is filler and each carries an operational constraint.

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 6-parameter mutation tool with no output schema, the definition covers identity/auth context, audit logging, capacity limits, idempotency, the correct alternative for edits, and the return value. Nothing material is missing for correct invocation.

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 parameter meaning is already largely documented; the description still adds the cross-tool sourcing rule for packing_line_id/available_boxes and enumerates the dimensions to confirm (line, boxes, customer, price). This is modest reinforcement rather than new syntax or format guidance.

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?

The description opens with a concrete verb and resource ('sets boxes of one packing line aside for a customer') and explicitly frames the write nature ('Changes data'). It is clearly distinguishable from update_preallocation and list_preallocations, both of which are named in context.

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?

It states an explicit trigger ('only when the user asks to pre-allocate, reserve or set aside boxes'), an explicit prerequisite (fetch packing_line_id and available_boxes from list_preallocations), and an explicit exclusion ('do not repeat a call that succeeded; to change one use update_preallocation'). When-to-use, when-not-to-use, and the alternative are all present.

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