Skip to main content
Glama
mattcoatsworth

ShipStation API MCP Server

get_order

Retrieve detailed order information from the ShipStation API by specifying the order ID using the structured MCP server tool.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
orderIdYesOrder ID to retrieve

Implementation Reference

  • The main handler function for the 'get_order' MCP tool. It takes orderId, fetches the order via shipStationClient.getOrder(), formats as JSON text response, or returns error.
    handler: async ({ orderId }) => { try { const order = await shipStationClient.getOrder(orderId); return { content: [{ type: "text", text: JSON.stringify(order, null, 2) }] }; } catch (error) { return { content: [{ type: "text", text: error.message }], isError: true }; } }
  • Zod schema defining the input for 'get_order': a required numeric orderId.
    schema: { orderId: z.number().describe("Order ID to retrieve") },
  • src/server.js:173-191 (registration)
    MCP server registration loop that includes 'get_order' from orderTools array, calling server.tool(name, schema, handler) for each.
    // Register all tools [ ...orderTools, ...shipmentTools, ...carrierTools, ...warehouseTools, ...productTools, ...customerTools, ...storeTools, ...webhookTools, ...fulfillmentTools ].forEach(tool => { server.tool( tool.name, tool.schema, tool.handler, { description: tool.description } ); });
  • Helper method in shipStationClient that performs the HTTP GET request to /orders/{orderId} to retrieve order details.
    async getOrder(orderId) { return this.request('GET', `/orders/${orderId}`); }

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