Repository navigation
Name Etsy tags over the 20-character limit when Etsy refuses them - #1553
Merged
Merged
Conversation
Etsy refuses tags over 20 characters on English listings without saying which tag. Append a hint naming each offending tag and its length, taken from the call's own arguments. Listings in other languages accept longer tags, so nothing is refused before the call; the tags description of the Etsy tools now says the limit applies to English.
helpcodeai
enabled auto-merge (squash)
November 6, 2026 08:55
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
Etsy refuses a listing tag longer than 20 characters with "There was a problem with /tags : cannot be more than 20 characters", without saying which tag. Models then guess, and the same call fails again. This PR appends a hint to that error naming each tag over the limit and its length, so the model can fix the call in one turn. It also corrects the tags description in the Etsy tools: the 20-character limit applies to English listings only.
Why not refuse such calls before they reach Etsy
That was the first plan. A read-only production check (counts only, last 14 days,
etsy_create_listing_draftandetsy_edit_listing) ruled it out:The limit therefore depends on the listing language, which the edit and create tools do not know before the call. A check before the call would have blocked those 109 calls Etsy accepts. The hint only runs after Etsy has already refused the call, so it never stops a call Etsy would take.
Design
ErrorHintInput(mcp-server/error-hints.ts) gets an optionalargsfield: the arguments of the call. The REST/engine error path inDynamicMcpTools.executeToolpasses them. Every existing rule ignores it.*.etsy.com, or a connector installed from theetsycatalog adapter) and the error text matches/tags : cannot be more than N characters. The limitNcomes from Etsy's own message.tag "handmade ceramic coffee mug" has 27 characters; Etsy allows at most 20 characters per tag on English listings. Shorten or replace it and call again with the other tags unchanged.etsyadapter plus Etsy's exact error text.Reaching installed connectors
parametersdescriptions (no endpoint mapping). That is the safe class the catalog auto-sync applies when the app starts, so installed connectors get it without the customer clicking "Apply update".Cloud and self-hosted
Both deployments behave the same. On self-hosted, the description change is applied when the app starts unless the operator set
CATALOG_AUTOSYNC=false, in which case it arrives with the next catalog update. The hint does not depend on that setting.Changes
packages/backend/src/mcp-server/error-hints.ts: optionalargsonErrorHintInput; an Etsy tag-length rule; a small exported helperoverlongListItems.packages/backend/src/mcp-server/dynamic-mcp-tools.ts: passes the call's arguments toderiveErrorHinton the engine error path.packages/backend/src/adapters/intl/etsy.json: the tags description ofetsy_create_listing_draft,etsy_edit_listing,etsy_add_listing_translationandetsy_replace_listing_translationnow says the 20-character limit is for English and that other languages may have longer tags. NomaxLengthwas added.error-hints.spec.ts(tags named with lengths, nothing else quoted, limit taken from Etsy's message, emoji counted as one character, long tag cut, no quote without arguments, no hint for another host);dynamic-mcp-tools.spec.ts(end to end through the executor with a catalog Etsy connector);adapters/intl/etsy.write-tools.spec.ts(every Etsy tool withtagsstates the English-only limit and has no length cap).Type
Testing
Commands run, with real results:
npm cithen, inpackages/backend,DATABASE_URL=… npx prisma generatepackages/backendnpx jest --maxWorkers=4 src/mcp-server/error-hints.spec.ts src/mcp-server/dynamic-mcp-tools.spec.ts src/adapters/intl/etsypackages/backendnpm run linteslint --fixrewrote nothingpackages/backendnpx tsc --noEmit -p tsconfig.jsonpackages/backendnpm test -- --maxWorkers=4src/auth/jwt-or-management-key.guard.spec.ts, which writes to a real database (prisma.organization.createfails inbeforeAll). That spec fails the same way, 8 of 8, on unmodifiedmainin the same environment: a baseline failure, not a regressionnode scripts/validate-adapters.mjs --warnmain(no new warnings)node scripts/regenerate-catalog.mjscatalog.tsunchangednode scripts/adapter-count.mjs --checkChecklist
npm test): all but one database-backed spec that also fails onmainlocally (see the table)Related Issues
Follows #1527 (Etsy's 140-character title limit). Found in the daily Cloud check of 2026-11-06.