Skip to main content
Glama

Clone Shipment

starshipit_clone_shipment

Duplicate a StarShipIt order to resend goods or create a return shipment; converts the order and swaps addresses when needed.

Instructions

Clone an existing shipment in StarShipIt, optionally converting it to a return shipment.

When to use: Use this tool to duplicate an existing order — for example, to resend the same goods to the same recipient, or to create a return shipment (pre-paid return label) based on an outbound order. The cloned order is created in a pending/unshipped state and will need a label printed separately.

Parameters:

  • order_id (required): The numeric StarShipIt order ID of the source shipment to clone.

  • to_return_shipment (optional): Set to true to create a return shipment from the original. The origin and destination addresses will be swapped. Defaults to false (standard clone).

Returns: The newly created order record including its new order ID, order number, and carrier details.

Example success response:

{
  "success": true,
  "order": {
    "order_id": 99999,
    "order_number": "CLONE-12345",
    "carrier": "AUSPOST"
  }
}

Error cases: 400 if the order ID is invalid; 404 if the source order does not exist; 409 if the order cannot be cloned in its current state.

Input Schema

NameRequiredDescriptionDefault
order_idYesThe StarShipIt order ID of the shipment to clone
to_return_shipmentNoSet to true to create a return shipment (swaps origin/destination). Default: false

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.3/5.0
Behavior5/5

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

Beyond the annotations, the description discloses the post-conditions (new order created in pending/unshipped state, label not printed), the side effect of address swapping in return mode, and concrete failure modes (400 invalid ID, 404 missing source, 409 non-cloneable state). These details are consistent with readOnlyHint=false and idempotentHint=false, since each invocation produces a new order.

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?

The definition is front-loaded with purpose, then use cases, parameters, returns, and errors in a scannable structure. The inline JSON success example is somewhat redundant given an output schema exists, costing a little length without adding information.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a two-parameter mutation tool, the description covers purpose, prerequisites, resulting state, and error handling, which is sufficient to call it correctly. It does not say which order fields carry over or whether the clone can be edited before labeling, but these are refinements rather than blockers.

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% and both parameters are already documented in the schema, including the origin/destination swap for to_return_shipment. The description largely restates this, adding only the framing that order_id refers to the 'source shipment' and that false means a standard clone — marginal added meaning.

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 first sentence names a specific verb and resource ('Clone an existing shipment in StarShipIt') plus the optional mode (return shipment). The 'When to use' paragraph clarifies that this duplicates an existing order rather than creating one from scratch, which separates it from siblings such as starshipit_create_order and starshipit_replace_shipment.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The 'When to use' section gives two concrete scenarios (resending the same goods, producing a prepaid return label from an outbound order) and warns that the result lands in a pending/unshipped state requiring a separate label print. It stops short of naming the alternatives (e.g., create_order vs. replace_shipment) or stating when cloning would be the wrong choice.

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