adr_lq_eq_check
Check if dangerous goods qualify for ADR Limited Quantity (LQ) or Excepted Quantity (EQ) exemptions by providing UN numbers, quantities, and units. Supports batch checks of up to 20 items.
Instructions
Check if dangerous goods qualify for ADR Limited Quantity (LQ) or Excepted Quantity (EQ) exemptions.
ADR 3.4 (Limited Quantities) allows reduced requirements for small quantities packed in inner packagings below a per-substance maximum. ADR 3.5 (Excepted Quantities, codes E1–E5) applies to very small quantities with even stricter per-inner limits.
Use this tool when you need to:
Check whether one or more items qualify for LQ transport (ADR 3.4)
Check whether one or more items qualify for EQ transport (ADR 3.5)
Work out the per-item LQ maximum or EQ code/limit for a UN number
Batch-check up to 20 items in a single call
Provide the mode ('lq' or 'eq') and an array of items with un_number, quantity, and unit. For EQ mode, optionally include inner_packaging_qty to validate the packaging arrangement.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | Yes | Check mode: 'lq' (Limited Quantity, ADR 3.4) or 'eq' (Excepted Quantity, ADR 3.5) | |
| items | Yes | Items to check (max 20 per call) |
Implementation Reference
- src/tools.ts:646-674 (handler)The handler for adr_lq_eq_check: calls apiPost to the 'adr/lq-check' endpoint with mode and items.
const adrLqEqCheck: ToolDef = { name: 'adr_lq_eq_check', description: `Check if dangerous goods qualify for ADR Limited Quantity (LQ) or Excepted Quantity (EQ) exemptions. ADR 3.4 (Limited Quantities) allows reduced requirements for small quantities packed in inner packagings below a per-substance maximum. ADR 3.5 (Excepted Quantities, codes E1–E5) applies to very small quantities with even stricter per-inner limits. Use this tool when you need to: - Check whether one or more items qualify for LQ transport (ADR 3.4) - Check whether one or more items qualify for EQ transport (ADR 3.5) - Work out the per-item LQ maximum or EQ code/limit for a UN number - Batch-check up to 20 items in a single call Provide the mode ('lq' or 'eq') and an array of items with un_number, quantity, and unit. For EQ mode, optionally include inner_packaging_qty to validate the packaging arrangement.`, schema: z.object({ mode: z.enum(['lq', 'eq']).describe("Check mode: 'lq' (Limited Quantity, ADR 3.4) or 'eq' (Excepted Quantity, ADR 3.5)"), items: z.array(z.object({ un_number: z.string().regex(/^(UN)?\d{4}$/i, 'UN number must be 4 digits, optionally prefixed with "UN"').describe('UN number (1–4 digits, e.g. "1203")'), quantity: z.number().positive().describe('Quantity of substance per inner packaging'), unit: z.enum(['ml', 'L', 'g', 'kg']).describe('Unit of measurement'), inner_packaging_qty: z.number().int().positive().optional().describe('Number of inner packagings (EQ mode only)'), })).min(1).max(20).describe('Items to check (max 20 per call)'), }).strict(), annotations: readOnlyAnnotations('ADR LQ / EQ Exemption Check'), handler: async (args) => apiPost('adr/lq-check', { mode: args.mode, items: args.items }), }; - src/tools.ts:660-668 (schema)Zod schema defining input: mode ('lq' or 'eq'), items array with un_number, quantity, unit, and optional inner_packaging_qty.
schema: z.object({ mode: z.enum(['lq', 'eq']).describe("Check mode: 'lq' (Limited Quantity, ADR 3.4) or 'eq' (Excepted Quantity, ADR 3.5)"), items: z.array(z.object({ un_number: z.string().regex(/^(UN)?\d{4}$/i, 'UN number must be 4 digits, optionally prefixed with "UN"').describe('UN number (1–4 digits, e.g. "1203")'), quantity: z.number().positive().describe('Quantity of substance per inner packaging'), unit: z.enum(['ml', 'L', 'g', 'kg']).describe('Unit of measurement'), inner_packaging_qty: z.number().int().positive().optional().describe('Number of inner packagings (EQ mode only)'), })).min(1).max(20).describe('Items to check (max 20 per call)'), }).strict(), - src/tools.ts:713-719 (registration)adrLqEqCheck is included in the ALL_TOOLS array which is exported and registered via the server.
export const ALL_TOOLS: ToolDef[] = [ cbmCalculator, chargeableWeightCalculator, ldmCalculator, adrLookup, adrExemptionCalculator, adrLqEqCheck, - src/api.ts:26-39 (helper)Generic POST helper that sends the actual API request to the FreightUtils backend.
export async function apiPost(endpoint: string, body: unknown): Promise<unknown> { const res = await fetch(`${BASE_URL}/${endpoint}`, { method: 'POST', headers: { 'Content-Type': 'application/json', 'Accept': 'application/json' }, body: JSON.stringify(body), }); if (!res.ok) { const text = await res.text(); throw new Error(`FreightUtils API error ${res.status}: ${text}`); } return res.json(); }