Skip to main content
Glama

Match an expected container to a shipment

match_expected_container
DestructiveIdempotent

Changes data: ties a planned expected container to the tracked shipment it turned out to be, as the person who connected this app, and records it in the organization's audit log. The container becomes matched, the proformas held on it are copied onto the shipment as documents, and the line's other suggestions are discarded for good and never come back. Use it only when the user says which shipment the container is, or after they accept a suggestion, and say what you are about to match first. If the container has suggestions, accept_expected_container_suggestion does the same for one of them. Matching a container to the shipment it is already matched to changes nothing. A container matched to another shipment, or canceled, is refused, and so is a shipment that already holds all the containers it can. Undo it with unmatch_expected_container. Sends nothing and calls no AI. Get the expected_container_id from list_expected_containers and 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": {
      "expected_container_id": "<expected_container_id>",
      "shipment_id": "<shipment_id>"
    },
    "name": "match_expected_container"
  }
}

Input Schema

NameRequiredDescriptionDefault
shipment_idYesA shipment id such as "shp_123", as returned by search_shipments.
expected_container_idYesAn expected container id such as "exs_90", as returned by list_expected_containers.

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 beyond the annotations: discloses audit logging, the acting identity, that proformas are copied onto the shipment as documents, that other suggestions are permanently discarded, and the three refusal conditions (already matched elsewhere, canceled, shipment at capacity). It also corroborates without contradicting destructiveHint, idempotentHint, and openWorldHint=false ('sends nothing and calls no AI').

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?

Dense and front-loaded with the mutation warning, then consequences, then gating rules. Every sentence carries information, though the final id-sourcing sentence largely duplicates the schema descriptions and could be trimmed.

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 two-param destructive mutation with no output schema, the description covers the resulting state, side effects, failure modes, idempotency behavior, and reversal path. Nothing an agent needs to invoke it safely is missing.

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 coverage is 100%, so both ids are already documented with examples and provenance in the schema. The closing sentence restates where to fetch expected_container_id and shipment_id, which is useful reinforcement but adds no new semantics. 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?

Opens with a specific verb+resource ('Changes data: ties a planned expected container to the tracked shipment') and immediately distinguishes itself from accept_expected_container_suggestion and unmatch_expected_container. An agent can identify the exact operation and its scope without opening the 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?

Explicit when-to-use ('only when the user says which shipment the container is, or after they accept a suggestion'), a confirmation ritual ('say what you are about to match first'), a named sibling for the suggestion path, and a named undo tool. This is the full when/when-not/alternatives set.

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