feat(everstox): add 2 MCP actions create-fulfillment-update-request and list-products#21249
feat(everstox): add 2 MCP actions create-fulfillment-update-request and list-products#21249michelle0927 wants to merge 10 commits into
Conversation
…st actions Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe PR adds Everstox app methods for fulfillment update requests and product listing, introduces new actions for both flows, and bumps the package plus several action versions. ChangesEverstox fulfillment and product actions
Estimated code review effort: 3 (Moderate) | ~20 minutes Sequence Diagram(s)sequenceDiagram
participant Action as Everstox action
participant App as everstox.app.mjs
participant API as Everstox API
Action->>App: createFulfillmentUpdateRequest(...) / listProducts(...)
App->>API: POST /fulfillment/{fulfillmentId}/update-requests or request to /products
API-->>App: response
App-->>Action: response
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@components/everstox/actions/list-products/list-products.mjs`:
- Line 6: The top-level description in listProducts should be expanded to follow
the agent-friendly component guidance: add when to use this action, key
parameter/filter format guidance with examples, and common pagination/filter
gotchas before the docs link. Update the description string in listProducts to
reflect primary purpose, usage conditions, and important caveats while keeping
the documentation link at the end.
- Around line 59-69: Reject negative pagination values at the prop layer by
adding validation to the limit and offset props in list-products.mjs so only
non-negative integers are accepted. Update the ListProducts action’s prop
definitions and, if needed, its input handling before the API call so invalid
values are caught locally instead of being forwarded unchanged from the action
logic that builds the request.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro
Run ID: 46941536-e9ae-4dc7-804d-5246fc19e833
📒 Files selected for processing (4)
components/everstox/actions/create-fulfillment-update-request/create-fulfillment-update-request.mjscomponents/everstox/actions/list-products/list-products.mjscomponents/everstox/everstox.app.mjscomponents/everstox/package.json
…n to limit/offset Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
components/everstox/actions/create-fulfillment-update-request/create-fulfillment-update-request.mjs (1)
64-84: 🎯 Functional Correctness | 🔵 Trivial | ⚡ Quick winGuard against no-op update requests.
With all of
fulfillmentItems,shippingAddress,billingAddress, andfulfillmentPriorityoptional, a user could invoke this action without setting any of them, producing an update request with an emptydatapayload. Consider aConfigurationErrorpre-check requiring at least one field to be set, consistent with the guideline thatConfigurationErroris for pre-call validation of user input mistakes.💡 Proposed validation
+ if (!this.fulfillmentItems && !this.shippingAddress && !this.billingAddress && this.fulfillmentPriority == null) { + throw new ConfigurationError("At least one of `fulfillmentItems`, `shippingAddress`, `billingAddress`, or `fulfillmentPriority` must be provided."); + } + const fulfillmentItems = this.fulfillmentItemsAs per path instructions, "
ConfigurationErroris appropriate only for pre-call validation of user configuration mistakes."🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@components/everstox/actions/create-fulfillment-update-request/create-fulfillment-update-request.mjs` around lines 64 - 84, Add a pre-call validation in createFulfillmentUpdateRequest’s run method to prevent empty update payloads. Before calling everstox.createFulfillmentUpdateRequest, check that at least one of fulfillmentItems, shippingAddress, billingAddress, or fulfillmentPriority is provided; if none are set, throw a ConfigurationError. Keep the validation close to the existing JSON parsing in run so the action fails early on user input mistakes.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Outside diff comments:
In
`@components/everstox/actions/create-fulfillment-update-request/create-fulfillment-update-request.mjs`:
- Around line 64-84: Add a pre-call validation in
createFulfillmentUpdateRequest’s run method to prevent empty update payloads.
Before calling everstox.createFulfillmentUpdateRequest, check that at least one
of fulfillmentItems, shippingAddress, billingAddress, or fulfillmentPriority is
provided; if none are set, throw a ConfigurationError. Keep the validation close
to the existing JSON parsing in run so the action fails early on user input
mistakes.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro
Run ID: cdb5cba7-90f9-4ded-96bf-57e451c7a6d0
📒 Files selected for processing (3)
components/everstox/actions/create-fulfillment-update-request/create-fulfillment-update-request.mjscomponents/everstox/actions/list-products/list-products.mjscomponents/everstox/common/constants.mjs
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
components/everstox/actions/create-fulfillment-update-request/create-fulfillment-update-request.mjs (1)
28-35: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick win
fulfillmentItemsis still required despite the "at least one of" validation.
shippingAddress,billingAddress, andfulfillmentPrioritywere all markedoptional: true, butfulfillmentItemswas not. Since it's missingoptional: true, Pipedream will force users to always supply it, contradicting the "at least one of" validation at Lines 66-71 and the conditionalJSON.parseat Lines 73-75, which both assume it can be absent. This blocks legitimate partial updates (e.g., priority-only or address-only changes), which is the same scope-mismatch concern raised in an earlier review round.🔧 Proposed fix
fulfillmentItems: { type: "string", label: "Fulfillment Items", description: "JSON array of fulfillment items to update. Must contain at least one item." + " Omit `id` when adding a new item; include it when updating an existing one." + " Each item requires a `product.sku` and a `price_set` with at least one entry." + " Example: `[{\"id\": \"550e8400-e29b-41d4-a716-446655440000\", \"quantity\": 2, \"product\": {\"sku\": \"PROD-001\"}, \"price_set\": [{\"quantity\": 2, \"currency\": \"EUR\", \"price_net_after_discount\": \"19.99\", \"tax_amount\": \"3.80\", \"tax_rate\": \"0.19\"}]}]`", + optional: true, },🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@components/everstox/actions/create-fulfillment-update-request/create-fulfillment-update-request.mjs` around lines 28 - 35, `fulfillmentItems` is still being treated as mandatory even though the action logic in `create-fulfillment-update-request.mjs` supports “at least one of” optional fields. Mark `fulfillmentItems` as optional in the action input definition alongside `shippingAddress`, `billingAddress`, and `fulfillmentPriority`, so partial updates can omit it; keep the existing validation and `JSON.parse` handling in the `run` logic aligned with the possibility that it is absent.Source: Path instructions
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Outside diff comments:
In
`@components/everstox/actions/create-fulfillment-update-request/create-fulfillment-update-request.mjs`:
- Around line 28-35: `fulfillmentItems` is still being treated as mandatory even
though the action logic in `create-fulfillment-update-request.mjs` supports “at
least one of” optional fields. Mark `fulfillmentItems` as optional in the action
input definition alongside `shippingAddress`, `billingAddress`, and
`fulfillmentPriority`, so partial updates can omit it; keep the existing
validation and `JSON.parse` handling in the `run` logic aligned with the
possibility that it is absent.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro
Run ID: af340dce-9dbe-486f-9fb9-d219c787a248
📒 Files selected for processing (1)
components/everstox/actions/create-fulfillment-update-request/create-fulfillment-update-request.mjs
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@components/everstox/common/utils.mjs`:
- Around line 7-13: The JSON parsing branch in `utils.mjs` wraps `JSON.parse`
failures in `ConfigurationError` but drops the original parse details. Update
the `catch` in the JSON string handling logic to include the caught
`error.message` (and any useful position info) in the thrown
`ConfigurationError` so callers of this utility can see the exact syntax issue
in the input.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro
Run ID: 1b7d63f2-9aa4-436e-bf24-57ca664c6a67
📒 Files selected for processing (2)
components/everstox/actions/create-fulfillment-update-request/create-fulfillment-update-request.mjscomponents/everstox/common/utils.mjs
…ey[]=value`
The default axios array serialization sends `?sku[]=X`, which Everstox
rejects with an opaque HTTP 500 (verified directly against
api.everstox.com: `?sku[]=X` → 500, `?sku=X&sku=Y` → 200). Same class of
bug hits any endpoint that takes array query params, notably `search-orders`
with `fields=[...]` (400 on bracket notation).
Add `paramsSerializer: { indexes: null }` to `_makeRequest` so axios
serializes arrays as repeated `key=value` pairs. Applies to every action
that goes through `_makeRequest`, so `list-products` (sku, warehouse_ids,
fields), `create-fulfillment-update-request`, and pre-existing actions
like `search-orders` (fields) all pick up the correct format on their
next publish.
Surfaced by an eval that called `list-products` with `sku=[realSku]` and
got a 500 for a SKU that exists in the account.
Eval results —
|
| # | Eval | Category | Targeted tool | Calls | Time | Result |
|---|---|---|---|---|---|---|
| 1 | Find products by SKU in the catalog | read | list-products |
1 | 9.7s | ✅ |
| 2 | Submit fulfillment update request | write | create-fulfillment-update-request |
1 | 6.8s | ✅ (real live update submitted) |
Bug the eval surfaced and fixed in ae505a48d
The first eval-run failed with HTTP 500 from Everstox when list-products was called with a sku filter. Direct API probe confirmed it: ?sku[]=X → 500, ?sku=X and ?sku=X&sku=Y → 200. axios's default array serialization uses bracket notation, so any array-valued query param (sku, warehouse_ids, fields on the pre-existing search-orders, ...) was silently unusable.
Fix landed in this PR's everstox.app.mjs::_makeRequest (+6 lines):
paramsSerializer: {
indexes: null,
},indexes: null tells axios to serialize arrays as repeated key=value pairs. Applies to every action bundled through _makeRequest, so list-products, create-fulfillment-update-request, and pre-existing actions like search-orders all pick up the correct format on their next publish.
Coverage under the current scope: 2/2 tools exercised (list-products and create-fulfillment-update-request). The 8 other everstox tools shown as untested are pre-existing and only version-bumped in this PR — the framework correctly narrowed eval scope to just the actions with real behavior changes.
Resolves #21167
Summary
Adds 2 new MCP-optimized actions for Everstox, a warehouse fulfillment platform:
Read actions
list-products— List products with filters (SKU, name, warehouse, date ranges, pagination)Write actions
create-fulfillment-update-request— Submit an update request for an active fulfillment (items, addresses, priority)Test plan
in_fulfillmentstate, extracts fulfillment ID, and successfully submits an update request🤖 Generated with Claude Code
Summary by CodeRabbit