Repository navigation
Compact WooCommerce list results by default; render large tool results without indentation - #1635
Merged
Merged
Conversation
…s without indentation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Second step after #1631. #1631 gave every installed WooCommerce connector the optional
_fieldskey (110 of 111 updated at the 10:56 boot). This PR gives_fieldsa compact default onwoocommerce_list_ordersandwoocommerce_search_products. A list call that doesn't pass_fieldsnow gets small objects: about 1-2 KB per order instead of 50-100 KB. It also stops the backend from pretty-printing multi-megabyte tool results.Matteo approved the default (customer-visible change) on 2026-11-11. The shop with the daily 600+ MB of full orders was told by email beforehand.
Changes
woocommerce.json,_fieldsdefault:meta_data, descriptions, images,_links._fields: ""(the engine drops an empty value, so WooCommerce returns complete objects), addmeta_datato the list, or use the get tools. Descriptions and the instructions say so.dynamic-mcp-tools.tsrenderResult: the result is serialised compactly first, and only results up to 1,000,000 characters (COMPACT_RENDER_CHARS) are re-rendered with indentation. A 10 MB page used to be pretty-printed to ~25 MB and then serialised a second time when over the limit. A plain string is still serialised once.woocommerce.live.spec.ts: defaults content;""documented; why a key and its default cannot arrive in the same deploy.catalog-resync.additive.spec.ts: fixture moved to themodified_*keys.dynamic-mcp-tools.spec.ts: a large object renders compactly without a pretty pass.Type
Testing
In
packages/backend:npx jest src/adapters/intl/woocommerce src/connectors/catalog-resync: passed.dynamic-mcp-tools.specneeds@aws-sdk/client-s3, which my local node_modules lacks, so it runs in CI.From the root:
validate-adapters --warnshows no new warning,regenerate-catalogshows no diff,adapter-count --checkis OK.Checklist
npm test) (CI)Cloud and self-hosted behave the same.
Related Issues
Follow-up to #1619 and #1631.