Skip to main content
Glama

Set one value on several packing lines

set_packing_line_values
DestructiveIdempotent

Changes data: sets one field (GGN, brand, comment or quality category) to one value on several packing lines of one shipment, as the person who connected this app, and records it in the organization's audit log. Each line is corrected as update_packing_line does, so the value replaces the old one and is kept when the list is read again. Use it only when the user asks, for example "put this GGN on the pallets of that grower", and say which lines and what value before calling it. An empty value clears the field. A line that already has the value is left alone, so it is safe to repeat. A packing line id that is not on this shipment is refused and nothing changes. The answer lists changed_lines. Get the shipment and the packing_line_ids from list_preallocations.

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": {
      "shipment_id": "<shipment_id>",
      "packing_line_ids": "<packing_line_ids>",
      "field": "<field>",
      "value": "<value>"
    },
    "name": "set_packing_line_values"
  }
}

Input Schema

NameRequiredDescriptionDefault
fieldYesThe field to set.
valueYesThe value to set on every line; empty to clear the field. A GGN is 13 digits (spaces and dashes are ignored).
shipment_idYesA shipment id such as "shp_123", as returned by search_shipments.
packing_line_idsYesThe packing lines to change, such as ["pln_5521", "pln_5522"].

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.6/5.0
Behavior5/5

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

Goes well past the annotations: it discloses that changes run as the connecting user, land in the organization's audit log, replace the previous value persistently, and that an empty value clears the field. It also explains the safe-retry contract (lines already holding the value are left alone) and the failure mode (an id not on the shipment is refused and nothing changes), neither of which the destructive/idempotent hints convey on their own.

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 mutation warning ('Changes data:') and orders facts by importance: effect, delegation to update_packing_line, permission gate, edge cases, return value, prerequisite. It is dense but almost every clause carries a distinct fact; a slightly more scannable structure would push it to 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?

Despite having no output schema, the description states that the response lists changed_lines and describes partial-failure behavior, so an agent knows what to report back. For a 4-parameter batch mutation, the preconditions (ids from list_preallocations), confirmations, and return shape are all covered.

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?

With 100% schema coverage the baseline is 3, and the description adds only the empty-value-clears semantic, which the schema already repeats. It also introduces a naming mismatch by calling the second field 'brand' while the enum calls it 'label', which could momentarily confuse an agent choosing a field value.

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 precise verb and resource: 'sets one field (GGN, brand, comment or quality category) to one value on several packing lines of one shipment'. It also distinguishes itself from the single-line sibling by saying each line 'is corrected as update_packing_line does', so an agent can tell batch from single-line editing without reading either schema.

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 explicit when-to-use guidance ('Use it only when the user asks, for example "put this GGN on the pallets of that grower"') plus a confirmation step ('say which lines and what value before calling it'). It also routes the agent to list_preallocations for the ids and to update_packing_line for the per-line equivalent, covering both prerequisites and alternatives.

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