Skip to main content
Glama

get_order

Retrieve detailed order information from ShipBob's fulfillment API by providing the order ID, enabling efficient order management and tracking.

Input Schema

NameRequiredDescriptionDefault
orderIdYesThe ID of the order to retrieve

Input Schema (JSON Schema)

{ "$schema": "http://json-schema.org/draft-07/schema#", "additionalProperties": false, "properties": { "orderId": { "description": "The ID of the order to retrieve", "type": "string" } }, "required": [ "orderId" ], "type": "object" }

Implementation Reference

  • Handler function for the 'get_order' tool. Fetches the specific order by ID using the ShipBob client and returns formatted JSON response or error message.
    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 }; } }
  • Zod input schema for the 'get_order' tool, defining the required 'orderId' parameter.
    schema: { orderId: z.string().describe("The ID of the order to retrieve") },
  • src/server.js:51-51 (registration)
    Registers the orderTools array (containing 'get_order' tool) with the MCP server via registerTools function.
    registerTools(orderTools);
  • ShipBobClient helper method 'getOrder' that performs the actual API GET request to retrieve order details by ID.
    async getOrder(id) { return this.request('GET', `/orders/${id}`); }

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