vehicle_lookup
Look up road freight vehicle and trailer specs: internal dimensions, payload limits, pallet capacity, and features for 17 types including articulated, rigid, and van categories.
Instructions
Look up road freight vehicle and trailer specifications.
17 types covering articulated trailers (curtainsider, mega, box, reefer, double-deck, flatbed, low-loader, US 53ft/48ft), rigid trucks (7.5T to 26T), and vans (Luton, Transit, Sprinter). Returns internal dimensions, payload limits, pallet capacity, and features.
Use this tool when you need to:
Find vehicle specs by type (e.g., "standard-curtainsider")
Compare EU vs US trailer dimensions
Determine pallet capacity for vehicle selection
Check payload limits for heavy shipments
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| slug | No | Vehicle slug (e.g., "standard-curtainsider"). Omit to list all. | |
| category | No | Filter by category | |
| region | No | Filter by region |
Implementation Reference
- src/tools.ts:618-640 (handler)The 'vehicle_lookup' tool handler — defines the tool with name, description, schema, annotations, and a handler that calls apiGet('vehicles', ...) with optional slug, category, and region filters.
const vehicleLookup: ToolDef = { name: 'vehicle_lookup', description: `Look up road freight vehicle and trailer specifications. 17 types covering articulated trailers (curtainsider, mega, box, reefer, double-deck, flatbed, low-loader, US 53ft/48ft), rigid trucks (7.5T to 26T), and vans (Luton, Transit, Sprinter). Returns internal dimensions, payload limits, pallet capacity, and features. Use this tool when you need to: - Find vehicle specs by type (e.g., "standard-curtainsider") - Compare EU vs US trailer dimensions - Determine pallet capacity for vehicle selection - Check payload limits for heavy shipments`, schema: z.object({ slug: z.string().optional().describe('Vehicle slug (e.g., "standard-curtainsider"). Omit to list all.'), category: z.enum(['articulated', 'rigid', 'van']).optional().describe('Filter by category'), region: z.enum(['EU', 'US']).optional().describe('Filter by region'), }).strict(), annotations: readOnlyAnnotations('Vehicle Lookup'), handler: async (args) => apiGet('vehicles', { slug: args.slug, category: args.category, region: args.region }), }; - src/tools.ts:630-634 (schema)Zod schema for vehicle_lookup — accepts optional slug (string), category (articulated|rigid|van), and region (EU|US). Uses .strict() to reject unknown keys.
schema: z.object({ slug: z.string().optional().describe('Vehicle slug (e.g., "standard-curtainsider"). Omit to list all.'), category: z.enum(['articulated', 'rigid', 'van']).optional().describe('Filter by category'), region: z.enum(['EU', 'US']).optional().describe('Filter by region'), }).strict(), - src/tools.ts:713-713 (registration)The ALL_TOOLS array that exports all ToolDefs, including vehicleLookup at index 17 (line 731).
export const ALL_TOOLS: ToolDef[] = [ - src/api.ts:7-24 (helper)The apiGet helper function called by the vehicle_lookup handler — constructs a URL with query params and fetches JSON from the FreightUtils API.
export async function apiGet(endpoint: string, params: Record<string, unknown>): Promise<unknown> { const url = new URL(`${BASE_URL}/${endpoint}`); for (const [k, v] of Object.entries(params)) { if (v === undefined || v === null || v === '') continue; url.searchParams.set(k, String(v)); } const res = await fetch(url.toString(), { headers: { 'Accept': 'application/json' }, }); if (!res.ok) { const body = await res.text(); throw new Error(`FreightUtils API error ${res.status}: ${body}`); } return res.json(); }