Skip to main content
Glama

get_shipment

Retrieve detailed shipment information by providing a valid shipment ID through the ShipBob fulfillment API, enabling efficient tracking and management of e-commerce orders.

Input Schema

NameRequiredDescriptionDefault
shipmentIdYesThe ID of the shipment to retrieve

Input Schema (JSON Schema)

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

Implementation Reference

  • Handler function for the 'get_shipment' MCP tool. Retrieves shipment details using shipbobClient.getShipment(shipmentId), formats as JSON text response or error.
    handler: async ({ shipmentId }) => { try { const shipment = await shipbobClient.getShipment(shipmentId); return { content: [{ type: "text", text: JSON.stringify(shipment, null, 2) }] }; } catch (error) { return { content: [{ type: "text", text: `Error retrieving shipment: ${error.message}` }], isError: true }; } }
  • Zod input schema for 'get_shipment' tool requiring 'shipmentId' as string.
    schema: { shipmentId: z.string().describe("The ID of the shipment to retrieve") },
  • Tool object definition for 'get_shipment' within the fulfillmentTools array, including name, description, schema, and handler.
    { name: "get_shipment", description: "Get details of a specific shipment by ID", schema: { shipmentId: z.string().describe("The ID of the shipment to retrieve") }, handler: async ({ shipmentId }) => { try { const shipment = await shipbobClient.getShipment(shipmentId); return { content: [{ type: "text", text: JSON.stringify(shipment, null, 2) }] }; } catch (error) { return { content: [{ type: "text", text: `Error retrieving shipment: ${error.message}` }], isError: true }; } } },
  • src/server.js:53-53 (registration)
    Registers the fulfillmentTools array (containing 'get_shipment') with the MCP server via registerTools(fulfillmentTools).
    registerTools(fulfillmentTools);
  • ShipBobClient.getShipment(id) helper method that performs the actual API request to retrieve a specific shipment.
    async getShipment(id) { return this.request('GET', `/shipments/${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