Skip to main content
Glama

Logistics: Set trip status

logistics_set_trip_status
Destructive

Move a trip through its lifecycle: Planned → Loading → EnRoute → Unloading → Done, or aside to Problem or Cancelled. The server enforces the rules, so gather what they need BEFORE calling: cancelling requires 'cancellation_reason'; closing a trip as Done requires an unloading weight AND a TTN number already recorded (see logistics_record_trip_weights) and, when the weight loss exceeds the workspace norm, an 'over_norm_comment' explaining it. Pass 'status_changed_at_utc' only when back-dating a transition that really happened earlier. A trip that has already left is never deleted — it is cancelled here. Requires confirmation. CONFIRMATION: this tool is PROPOSED, never performed directly. You get status='confirmation_required' with an action_id and a plan_token, and the write happens only after confirm_action.

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": {
      "trip_id": "<trip_id>",
      "status": "<status>"
    },
    "name": "logistics_set_trip_status"
  }
}

Input Schema

NameRequiredDescriptionDefault
statusYesOne of: Planned, Loading, EnRoute, Unloading, Done, Problem, Cancelled.
trip_idYes
over_norm_commentNo
cancellation_reasonNo
status_changed_at_utcNoISO date (YYYY-MM-DD) or datetime.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.9/5.0
Behavior5/5

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

Annotations only give destructiveHint=true and readOnlyHint=false; the description adds the critical behavior an agent cannot infer: the server enforces transition rules, the call is two-phase (proposes with status='confirmation_required' returning action_id and plan_token, write happens only after confirm_action), and how to interpret status_changed_at_utc. It also clarifies that no deletion occurs, which refines rather than contradicts destructiveHint.

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?

Prerequisites and the confirmation flow are front-loaded and every clause carries real information. There is minor redundancy in stating 'Requires confirmation' and then restating the full CONFIRMATION protocol in the next sentence, which could be merged.

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?

There is no output schema, so the description supplies the return shape itself (status='confirmation_required' with action_id and plan_token) along with the follow-up tool. For a destructive, rule-enforcing mutation this is as complete as an agent needs to call it correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is only 40%, and the description compensates fully: it explains when 'cancellation_reason' is mandatory, the compound condition that makes 'over_norm_comment' required, and that 'status_changed_at_utc' is only for genuine back-dating. trip_id is the only parameter left to the schema, which is self-evident.

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 description opens with a specific verb and resource ('Move a trip through its lifecycle') and enumerates the exact state machine (Planned → Loading → EnRoute → Unloading → Done, plus Problem/Cancelled). An agent can distinguish this from logistics_update_trip or logistics_assign_trip 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?

It gives explicit preconditions per transition (cancelling needs 'cancellation_reason'; Done needs an unloading weight plus TTN recorded via logistics_record_trip_weights, plus 'over_norm_comment' when loss exceeds the norm) and explicitly warns to gather these BEFORE calling. It also resolves a likely ambiguity: 'A trip that has already left is never deleted — it is cancelled here.'

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