PipedreamHQ / PipedreamHQ/pipedream
QuickBooks create-estimate, create-invoice, create-purchase, create-bill · reloadProps failure in MCP tools-only + Connect API · same root cause as #16379
- Dominant language
- JavaScript
- Stars
- 11.7k
- Forks
- 5.8k
- Avg merge
- 3d 10h
- Merged PRs (30d)
- 102
Description
QuickBooks create-estimate, create-invoice, create-purchase, and create-bill fail in MCP tools-only mode and single-call Connect API execution when lineItemsAsObjects=true and lineItems are provided in the same request. The shared cause is that lineItems is exposed only through additionalProps(), triggered by reloadProps: true; headless execution does not perform the intermediate dynamic-prop reload, so this.lineItems is undefined at runtime. parseLineItems(this.lineItems) therefore returns undefined and the subsequent lines.forEach(...) throws: TypeError: Cannot read properties of undefined (reading 'forEach'). Reproduction: invoke any affected action in MCP tools-only, MCP /v3, or Connect API runAction with lineItemsAsObjects=true and populated lineItems, without a preceding POST /v1/connect/components/props reload round trip. Expected behavior: each action should accept lineItemsAsObjects=true and lineItems within one headless request; missing or empty lineItems should return a descriptive validation error instead of throwing. Affected actions and versions: create-estimate v0.0.5, create-invoice v0.2.7, create-purchase v0.0.11, and create-bill v0.1.13. Proposed fix: remove reloadProps: true from lineItemsAsObjects; eliminate the additionalProps() dependency; declare lineItems as a static string[] prop in base props; and validate it in run() when lineItemsAsObjects is enabled. This is the same headless dynamic-prop limitation tracked in #16379, with related precedent in #20006 and static-prop remediation examples in #20007 and #21344. Environment: QuickBooks OAuth 2.0 via Pipedream Connect; MCP /v2 tools-only, MCP /v3, and Pipedream Connect API; QBO API minor version 75. Affected sources: https://github.com/PipedreamHQ/pipedream/blob/master/components/quickbooks/actions/create-estimate/create-estimate.mjs ; https://github.com/PipedreamHQ/pipedream/blob/master/components/quickbooks/actions/create-invoice/create-invoice.mjs ; https://github.com/PipedreamHQ/pipedream/blob/master/components/quickbooks/actions/create-purchase/create-purchase.mjs ; https://github.com/PipedreamHQ/pipedream/blob/master/components/quickbooks/actions/create-bill/create-bill.mjs ; https://github.com/PipedreamHQ/pipedream/blob/master/components/quickbooks/common/utils.mjs
Contributor guide
Research direction
Start with the four affected action sources and common/utils.mjs, then reproduce one create action through MCP tools-only or Connect API with lineItemsAsObjects=true and populated lineItems. Confirm all four actions handle lineItems in one headless request and return a descriptive validation error for missing or empty lineItems instead of throwing.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- api
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Clearly specified
- Newbie friendliness
- 70/100