track_shipment
Track DB Schenker shipments by reference number to get structured details including sender/receiver information, package data, and complete tracking history.
Instructions
Track a DB Schenker shipment by reference number and return structured shipment details and tracking history.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| reference | Yes | DB Schenker tracking reference number (e.g. 1806203236) |
Implementation Reference
- src/tools/trackShipment.ts:19-29 (handler)The core handler function for the 'track_shipment' MCP tool. It invokes the DbSchenkerAdapter to track the shipment by reference and formats the result as JSON text content.}, async ({ reference }: { reference: string }) => { const result = await adapter.track(reference); return { content: [ { type: "text", text: JSON.stringify(result, null, 2), }, ], }; });
- src/tools/trackShipment.ts:6-11 (schema)Zod input schema validating the 'reference' parameter for the track_shipment tool.const inputSchema = z.object({ reference: z .string() .min(3) .describe("DB Schenker tracking reference number (e.g. 1806203236)"), });
- src/tools/trackShipment.ts:14-30 (registration)Registration function that adds the 'track_shipment' tool to the MCP server, including metadata, schema, and handler.export function registerTrackShipmentTool(server: McpServer) { server.registerTool("track_shipment", { title: "Track shipment", description: "Track a DB Schenker shipment by reference number and return structured shipment details and tracking history.", inputSchema, }, async ({ reference }: { reference: string }) => { const result = await adapter.track(reference); return { content: [ { type: "text", text: JSON.stringify(result, null, 2), }, ], }; }); }
- src/server.ts:17-17 (registration)Invocation of the tool registration function during server setup.registerTrackShipmentTool(server);