Skip to main content
Glama

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
NameRequiredDescriptionDefault
orderIdYesThe ID of the order to retrieve

Implementation Reference

  • 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 }; } }
  • 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") },
  • 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);

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/mattcoatsworth/shipbob-mcp-server'

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