Skip to main content
Glama
mattcoatsworth

ShipStation API MCP Server

get_shipment

Retrieve detailed shipment information by providing the shipment ID using the ShipStation API MCP Server. Simplify tracking and management of orders and logistics.

Input Schema

NameRequiredDescriptionDefault
shipmentIdYesShipment ID to retrieve

Input Schema (JSON Schema)

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

Implementation Reference

  • The handler function that executes the 'get_shipment' tool logic: fetches shipment details via ShipStation API and returns JSON response or error.
    handler: async ({ shipmentId }) => { try { const shipment = await shipStationClient.getShipment(shipmentId); return { content: [{ type: "text", text: JSON.stringify(shipment, null, 2) }] }; } catch (error) { return { content: [{ type: "text", text: error.message }], isError: true }; } }
  • Input schema using Zod for validating the required 'shipmentId' parameter.
    schema: { shipmentId: z.number().describe("Shipment ID to retrieve") },
  • src/server.js:174-191 (registration)
    Registration code that spreads shipmentTools (containing 'get_shipment') and registers each tool with the MCP server using server.tool().
    [ ...orderTools, ...shipmentTools, ...carrierTools, ...warehouseTools, ...productTools, ...customerTools, ...storeTools, ...webhookTools, ...fulfillmentTools ].forEach(tool => { server.tool( tool.name, tool.schema, tool.handler, { description: tool.description } ); });
  • ShipStationClient helper method that performs the actual API GET request for a specific shipment, called by the tool handler.
    async getShipment(shipmentId) { return this.request('GET', `/shipments/${shipmentId}`); }

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

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