Skip to main content
Glama
SoapyRED

FreightUtils MCP Server

adr_lq_eq_check

Read-onlyIdempotent

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

TableJSON Schema
NameRequiredDescriptionDefault
modeYesCheck mode: 'lq' (Limited Quantity, ADR 3.4) or 'eq' (Excepted Quantity, ADR 3.5)
itemsYesItems to check (max 20 per call)

Implementation Reference

  • 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 }),
    };
  • 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,
  • 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();
    }
Behavior5/5

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

Annotations already declare readOnlyHint=true, destructiveHint=false, idempotentHint=true. Description adds behavioral context like the ADR regulatory framework (3.4, 3.5), batch size limit, and parameter details. No contradiction.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded with purpose, then brief paragraphs for details. Every sentence adds value; no fluff. Efficiently structured for quick understanding.

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?

Given the complexity of ADR exemptions and no output schema, the description fully explains the tool's behavior, parameters, and limitations (max 20 items). Agent can confidently decide to use it.

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 100%, yet description adds meaning beyond schema: explains mode enum maps to ADR sections, items array structure, optional inner_packaging_qty for EQ mode, and per-item limits.

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?

Description starts with 'Check if dangerous goods qualify for ADR Limited Quantity (LQ) or Excepted Quantity (EQ) exemptions' which clearly states the verb and resource. It is distinct from sibling tools like adr_exemption_calculator and adr_lookup by focusing specifically on LQ/EQ exemptions.

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?

Description explicitly lists four specific use cases (e.g., 'Check whether one or more items qualify for LQ transport'), and mentions batch-checking up to 20 items. It provides clear guidance on when to use this tool.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/SoapyRED/freightutils-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server