Skip to main content
Glama

Set a shipment's GGN

set_shipment_ggn
DestructiveIdempotent

Changes data: sets one GGN (the grower's 13-digit number) for a whole shipment, as the person who connected this app, and records it in the organization's audit log. It replaces the GGN stored on the shipment and is written into every packing line that has no GGN, now and after every later packing list is read; lines that already have a GGN keep theirs, so a load with several growers stays correct. Use it only when the user gives the GGN or asks to fix the missing-GGN check, and say what will change before calling it. Setting the GGN the shipment already has, with no line left to fill, changes nothing, so it is safe to repeat. The answer gives ggn, previous_ggn and filled_lines. For one GGN on chosen lines use set_packing_line_values. Get the shipment_id from search_shipments.

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>",
      "ggn": "<ggn>"
    },
    "name": "set_shipment_ggn"
  }
}

Input Schema

NameRequiredDescriptionDefault
ggnYesThe grower's GGN, 13 digits (spaces and dashes are ignored).
shipment_idYesA shipment id such as "shp_123", as returned by search_shipments.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.6/5.0
Behavior4/5

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

Annotations already declare mutation, destructiveness and idempotency; the description adds genuinely new context: the value is written into every GGN-less packing line, persists into future packing-list reads, existing line GGNs are preserved, the write is attributed to the connected user and audit-logged, and the return keys ggn/previous_ggn/filled_lines are named. This is well beyond annotation coverage. It stops short of 5 only because it does not flag whether existing line values can ever be overwritten later or how conflicts across growers are resolved beyond the preserved-GGN rule.

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 mutation and scope, then constraints, then the alternative — a sensible order with no filler sentences. It is dense, and the parenthetical restating the 13-digit format duplicates the schema, so it is not maximally tight.

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 destructive, propagating write with no output schema, the description covers what is overwritten, what is preserved, the future-write side effect, the idempotent no-op case, the audit trail, and the return fields. Nothing needed to call it safely 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 baseline is 3, but the description adds real meaning: the ggn applies shipment-wide rather than to a chosen line, and the shipment_id must come from search_shipments. The 13-digit format detail overlaps the schema and is not additive.

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 ("sets one GGN ... for a whole shipment"), defines the value (grower's 13-digit number), and separates itself from set_packing_line_values, which handles a single GGN on chosen lines. An agent can distinguish the whole-shipment scope from the per-line sibling without opening 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 an explicit trigger ("only when the user gives the GGN or asks to fix the missing-GGN check"), a precondition (say what will change before calling), and a named alternative with its selecting condition. It also routes the agent to search_shipments for the shipment_id, so the whole call sequence is covered.

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