list_automation_rules

Updated May 21, 20261 min read

List all automation rules within a ruleset.

Rules are evaluated in sequence order — lower sequence number = higher priority. The first matching rule determines carrier assignment for the shipment. Each rule defines conditions (weight, delivery type, geography, etc.) and a target carrier account.

Parameters

NameTypeRequiredDescription
tenantIdstringYesThe tenant.
ruleset_idstringYesThe ruleset to list rules from.

Returns

An array of rule records — each with sequence, name, conditions, target carrier account, status. Sorted by sequence.

Example agent prompts

"What rules are in ruleset RS-001?"

list_automation_rules(
  tenantId="…",
  ruleset_id="RS-001"
)

"Why was SHP-12345 routed to Aramex? Which rule matched?"

The agent reads the shipment, identifies the ruleset, lists the rules, and walks through them in sequence — narrating which rule's conditions match SHP-12345 and stops at the first match. If multiple rules' conditions are satisfied, the lower-sequence one wins.

Notes

  • For understanding a routing decision, this tool is usually enough — the conditions are visible in the list response. Drop to get_automation_rule only when you need extra detail on a single rule.
  • Rule evaluation is server-side; this tool only describes the rules, it doesn't evaluate them. To know which rule a hypothetical shipment would match, either call create_shipment(draft=true) and read the result, or simulate the conditions yourself.