Skip to main content
Glama
mattcoatsworth

ShipStation API MCP Server

update_warehouse

Update warehouse details in ShipStation by providing the warehouse ID and JSON-formatted updated data to ensure accurate inventory and logistics management.

Input Schema

NameRequiredDescriptionDefault
warehouseDataYesJSON string containing the updated warehouse data
warehouseIdYesWarehouse ID to update

Input Schema (JSON Schema)

{ "$schema": "http://json-schema.org/draft-07/schema#", "additionalProperties": false, "properties": { "warehouseData": { "description": "JSON string containing the updated warehouse data", "type": "string" }, "warehouseId": { "description": "Warehouse ID to update", "type": "number" } }, "required": [ "warehouseId", "warehouseData" ], "type": "object" }

Implementation Reference

  • The handler function that implements the core logic for the 'update_warehouse' tool: parses JSON input, calls the API helper, and formats the response or error.
    handler: async ({ warehouseId, warehouseData }) => { try { const parsedData = JSON.parse(warehouseData); const result = await shipStationClient.updateWarehouse(warehouseId, parsedData); return { content: [{ type: "text", text: JSON.stringify(result, null, 2) }] }; } catch (error) { return { content: [{ type: "text", text: error.message }], isError: true }; } }
  • Zod input schema validating warehouseId as number and warehouseData as string (JSON).
    schema: { warehouseId: z.number().describe("Warehouse ID to update"), warehouseData: z.string().describe("JSON string containing the updated warehouse data") },
  • Full tool object registration within the warehouseTools array, including name, description, schema, and handler.
    { name: "update_warehouse", description: "Update an existing warehouse", schema: { warehouseId: z.number().describe("Warehouse ID to update"), warehouseData: z.string().describe("JSON string containing the updated warehouse data") }, handler: async ({ warehouseId, warehouseData }) => { try { const parsedData = JSON.parse(warehouseData); const result = await shipStationClient.updateWarehouse(warehouseId, parsedData); return { content: [{ type: "text", text: JSON.stringify(result, null, 2) }] }; } catch (error) { return { content: [{ type: "text", text: error.message }], isError: true }; } } },
  • Supporting API client method that makes the actual PUT request to ShipStation's warehouse update endpoint.
    async updateWarehouse(warehouseId, data) { return this.request('PUT', `/warehouses/${warehouseId}`, data); }

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