refresh_store
Refresh store data in ShipStation API by specifying the store ID to ensure updated and accurate store information for order and shipment management.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| storeId | Yes | Store ID to refresh |
Input Schema (JSON Schema)
{
"$schema": "http://json-schema.org/draft-07/schema#",
"additionalProperties": false,
"properties": {
"storeId": {
"description": "Store ID to refresh",
"type": "number"
}
},
"required": [
"storeId"
],
"type": "object"
}
Implementation Reference
- src/tools/store-tools.js:67-78 (handler)The MCP tool handler for 'refresh_store'. Accepts storeId, invokes shipStationClient.refreshStore(storeId), formats result as JSON text response or error.handler: async ({ storeId }) => { try { const result = await shipStationClient.refreshStore(storeId); return { content: [{ type: "text", text: JSON.stringify(result, null, 2) }] }; } catch (error) { return { content: [{ type: "text", text: error.message }], isError: true }; }
- src/tools/store-tools.js:64-66 (schema)Input schema using Zod: requires storeId as number.schema: { storeId: z.number().describe("Store ID to refresh") },
- src/tools/store-tools.js:61-80 (registration)Tool definition object for 'refresh_store' in storeTools array, exported and later registered in server.js.{ name: "refresh_store", description: "Refresh store data", schema: { storeId: z.number().describe("Store ID to refresh") }, handler: async ({ storeId }) => { try { const result = await shipStationClient.refreshStore(storeId); return { content: [{ type: "text", text: JSON.stringify(result, null, 2) }] }; } catch (error) { return { content: [{ type: "text", text: error.message }], isError: true }; } } },
- src/api-client.js:178-179 (helper)Helper method on ShipStationClient instance: proxies POST /stores/refreshstore to ShipStation API with storeId.async refreshStore(storeId) { return this.request('POST', '/stores/refreshstore', { storeId });