get_order
Retrieve specific order details from ShipBob's fulfillment system using the order ID to access shipping, inventory, and status information.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| orderId | Yes | The ID of the order to retrieve |
Implementation Reference
- src/tools/order-tools.js:39-54 (handler)Handler function that retrieves the order details using shipbobClient.getOrder and returns formatted JSON response or error.handler: async ({ orderId }) => { try { const order = await shipbobClient.getOrder(orderId); return { content: [{ type: "text", text: JSON.stringify(order, null, 2) }] }; } catch (error) { return { content: [{ type: "text", text: `Error retrieving order: ${error.message}` }], isError: true }; } }
- src/tools/order-tools.js:36-38 (schema)Input schema for the get_order tool using Zod, requiring orderId as string.schema: { orderId: z.string().describe("The ID of the order to retrieve") },
- src/tools/order-tools.js:33-55 (registration)Tool definition object with name, description, schema, and handler, part of the orderTools array export.{ name: "get_order", description: "Get details of a specific order by ID", schema: { orderId: z.string().describe("The ID of the order to retrieve") }, handler: async ({ orderId }) => { try { const order = await shipbobClient.getOrder(orderId); return { content: [{ type: "text", text: JSON.stringify(order, null, 2) }] }; } catch (error) { return { content: [{ type: "text", text: `Error retrieving order: ${error.message}` }], isError: true }; } } },
- src/server.js:51-51 (registration)Registers the orderTools array (including get_order) with the MCP server using the registerTools utility.registerTools(orderTools);