Skip to main content
Glama

Replace Shipment

starshipit_replace_shipment
Destructive

Voids an existing StarShipIt shipment label and creates a new one when order details change after label printing.

Instructions

Replace an existing shipment in StarShipIt — voids the previous label and creates a new one.

When to use: Use this tool when an existing label must be voided and replaced, such as when order details have changed after a label was printed (address correction, weight change, carrier change). This is a destructive operation: the previous label is voided with the carrier.

Warning: This action voids the carrier label for the existing shipment. If the package has already been dispatched with that label, do NOT use this tool. Coordinate with the carrier directly in that case.

Parameters:

  • order_id (required): The numeric StarShipIt order ID whose shipment label should be voided and replaced.

Returns: The updated order record including the new label URL, new tracking number, carrier, and service details.

Example success response:

{
  "success": true,
  "order": {
    "order_id": 12345,
    "order_number": "ORD-12345",
    "carrier": "DHL",
    "tracking_number": "NEWTRACK001",
    "label_url": "https://cdn.starshipit.com/labels/label-12345-v2.pdf"
  }
}

Error cases: 400 if the order ID is invalid; 404 if the order does not exist; 409 if the order is manifested or already dispatched and cannot be replaced.

Input Schema

NameRequiredDescriptionDefault
order_idYesThe StarShipIt order ID whose label will be voided and replaced with a new one

Output Schema

NameRequiredDescriptionDefault
errorsNoValidation or processing errors returned by StarShipIt
objectNoThe response payload when StarShipIt returns a non-object value
successNoStarShipIt success flag (a boolean on most endpoints)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.6/5.0
Behavior5/5

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

Annotations already declare destructiveHint=true and non-idempotence, and the description adds substantive context beyond them: the carrier label is actually voided, the action is unrecoverable if dispatched, and specific error codes (400/404/409 manifested-or-dispatched) are enumerated. This is real behavioral disclosure, not restatement.

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?

Headings (When to use, Warning, Parameters, Returns, Error cases) make it well front-loaded and scannable. However, the full example success-response JSON is somewhat redundant given a dedicated output schema exists, making the definition longer than strictly necessary.

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 single-parameter destructive tool, the description covers purpose, trigger conditions, hazard, parameters, and error behavior. The return-values section is arguably duplicative of the output schema, but nothing an agent needs in order to call it correctly 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?

There is a single parameter at 100% schema description coverage, and the description's explanation ('numeric StarShipIt order ID whose label should be voided and replaced') largely mirrors the schema's own description. It adds the 'numeric' type hint but no format or sourcing guidance beyond that, so the 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?

First sentence states a specific verb and resource and adds the key mechanism ('voids the previous label and creates a new one'), which distinguishes it clearly from siblings like starshipit_clone_shipment or starshipit_manifest_shipment. An agent can identify the tool's distinct effect without opening any 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 is given ('when an existing label must be voided and replaced, such as address correction, weight change, carrier change') plus an explicit when-NOT-to-use warning for dispatched packages with guidance to coordinate with the carrier. This is the full when/when-not/alternative pattern done well.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.