ebay-mcp 1.13.2 → 1.14.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (169) hide show
  1. package/README.de.md +3 -3
  2. package/README.es.md +3 -3
  3. package/README.fr.md +3 -3
  4. package/README.ja.md +3 -3
  5. package/README.ko.md +3 -3
  6. package/README.md +163 -41
  7. package/README.pt-BR.md +3 -3
  8. package/README.ru.md +3 -3
  9. package/README.zh-CN.md +3 -3
  10. package/build/api/account-management/account.js +633 -297
  11. package/build/api/analytics-and-report/analytics.js +111 -65
  12. package/build/api/client.js +199 -140
  13. package/build/api/clientRequestError.js +23 -0
  14. package/build/api/clientTrading.js +213 -0
  15. package/build/api/clientTradingError.js +4 -0
  16. package/build/api/communication/feedback.js +147 -59
  17. package/build/api/communication/message.js +134 -81
  18. package/build/api/communication/negotiation.js +65 -53
  19. package/build/api/communication/notification.js +458 -164
  20. package/build/api/developer/developer.js +99 -45
  21. package/build/api/index.js +23 -8
  22. package/build/api/listing-management/inventory.js +884 -338
  23. package/build/api/listing-metadata/metadata.js +416 -170
  24. package/build/api/listing-metadata/taxonomy.js +187 -42
  25. package/build/api/marketing-and-promotions/marketing.js +1392 -598
  26. package/build/api/marketing-and-promotions/recommendation.js +49 -24
  27. package/build/api/order-management/dispute.js +226 -45
  28. package/build/api/order-management/fulfillment.js +144 -71
  29. package/build/api/order-management/orderIssueHelpers.js +61 -0
  30. package/build/api/other/compliance.js +50 -38
  31. package/build/api/other/edelivery.js +603 -159
  32. package/build/api/other/finding.js +280 -0
  33. package/build/api/other/identity.js +30 -15
  34. package/build/api/other/translation.js +29 -14
  35. package/build/api/other/vero.js +113 -27
  36. package/build/api/rateLimitTracker.js +55 -0
  37. package/build/api/shared/request.js +189 -98
  38. package/build/api/trading/trading.js +154 -87
  39. package/build/auth/credentialSession.js +250 -0
  40. package/build/auth/oauth.js +298 -171
  41. package/build/auth/{oauth-metadata.js → oauthMetadata.js} +22 -6
  42. package/build/auth/oauthMiddleware.js +104 -0
  43. package/build/auth/{scope-utils.js → scopeUtils.js} +101 -28
  44. package/build/auth/tokenVerifier.js +243 -0
  45. package/build/auth/tokenVerifierError.js +21 -0
  46. package/build/config/environment.js +148 -113
  47. package/build/config/{tool-families.js → toolFamilies.js} +30 -14
  48. package/build/index.js +25 -19
  49. package/build/mcp/{http-transport.js → httpTransport.js} +102 -52
  50. package/build/mcp/readOnlyFilter.js +67 -0
  51. package/build/mcp/runtime.js +31 -13
  52. package/build/mcp/{tool-gating.js → toolGating.js} +77 -49
  53. package/build/mcp/{ui-bridge.js → uiBridge.js} +80 -23
  54. package/build/schemas/account-management/account.js +144 -6
  55. package/build/schemas/analytics/analytics.js +33 -19
  56. package/build/schemas/communication/messages.js +12 -42
  57. package/build/schemas/developer/developer.js +135 -0
  58. package/build/schemas/fulfillment/orders.js +183 -21
  59. package/build/schemas/index.js +27 -19
  60. package/build/schemas/inventory-management/inventory.js +17 -9
  61. package/build/schemas/marketing/marketing.js +480 -25
  62. package/build/schemas/metadata/metadata.js +11 -6
  63. package/build/schemas/other/finding.js +27 -0
  64. package/build/schemas/other/otherApis.js +424 -0
  65. package/build/schemas/taxonomy/taxonomy.js +11 -5
  66. package/build/scripts/{auto-setup.js → autoSetup.js} +87 -74
  67. package/build/scripts/{build-ui.js → buildUi.js} +6 -1
  68. package/build/scripts/{dev-sync.js → devSync.js} +169 -110
  69. package/build/scripts/diagnostics.js +52 -44
  70. package/build/scripts/{download-specs.js → downloadSpecs.js} +29 -21
  71. package/build/scripts/{interactive-setup.js → interactiveSetup.js} +84 -78
  72. package/build/scripts/setup.js +241 -178
  73. package/build/scripts/{setup-shared.js → setupShared.js} +29 -7
  74. package/build/scripts/skills.js +35 -27
  75. package/build/scripts/updateApiStatusDoc.js +71 -0
  76. package/build/serverHttp.js +90 -0
  77. package/build/skills/content.js +124 -118
  78. package/build/skills/index.js +22 -10
  79. package/build/skills/install.js +21 -10
  80. package/build/skills/markers.js +50 -15
  81. package/build/skills/{registry-snapshot.js → registrySnapshot.js} +8 -2
  82. package/build/skills/render.js +41 -14
  83. package/build/skills/targets.js +49 -17
  84. package/build/tools/categories/account.js +166 -264
  85. package/build/tools/categories/analytics.js +11 -22
  86. package/build/tools/categories/browse.js +17 -0
  87. package/build/tools/categories/communication.js +124 -399
  88. package/build/tools/categories/connector.js +23 -20
  89. package/build/tools/categories/developer.js +46 -159
  90. package/build/tools/categories/fulfillment.js +84 -215
  91. package/build/tools/categories/index.js +6 -14
  92. package/build/tools/categories/inventory.js +238 -293
  93. package/build/tools/categories/marketing.js +677 -39
  94. package/build/tools/categories/metadata.js +190 -117
  95. package/build/tools/categories/other.js +81 -208
  96. package/build/tools/categories/taxonomy.js +29 -20
  97. package/build/tools/categories/{token-management.js → tokenManagement.js} +187 -192
  98. package/build/tools/categories/trading.js +16 -47
  99. package/build/tools/contracts.js +34 -24
  100. package/build/tools/{define-tool.js → defineTool.js} +44 -29
  101. package/build/tools/registry.js +87 -29
  102. package/build/tools/schemas.js +3 -57
  103. package/build/tools/ui/archetypes.js +1 -0
  104. package/build/tools/ui/{map-helpers.js → mapHelpers.js} +69 -19
  105. package/build/tools/ui/maps.js +294 -80
  106. package/build/types/index.js +1 -1
  107. package/build/ui/card.html +14 -14
  108. package/build/ui/chart.html +14 -14
  109. package/build/ui/stat.html +87 -0
  110. package/build/ui/table.html +14 -14
  111. package/build/utils/apiStatusFeed.js +95 -0
  112. package/build/utils/cliOutput.js +15 -0
  113. package/build/utils/cliUi.js +108 -0
  114. package/build/utils/communication/feedback.js +57 -77
  115. package/build/utils/communication/message.js +69 -98
  116. package/build/utils/communication/negotiation.js +30 -57
  117. package/build/utils/communication/notification.js +112 -252
  118. package/build/utils/{date-converter.js → dateConverter.js} +62 -30
  119. package/build/utils/effectSchema.js +203 -0
  120. package/build/utils/effectSchemaAdapter.js +121 -0
  121. package/build/utils/effectSchemaChainMethods.js +146 -0
  122. package/build/utils/effectSchemaRefinements.js +104 -0
  123. package/build/utils/effectSchemaStringMethods.js +63 -0
  124. package/build/utils/effectSchemaTypes.js +47 -0
  125. package/build/utils/{env-parser.js → envParser.js} +10 -2
  126. package/build/utils/errors.js +7 -3
  127. package/build/utils/http.js +148 -89
  128. package/build/utils/{llm-client-detector.js → llmClientDetector.js} +295 -274
  129. package/build/utils/logger.js +127 -51
  130. package/build/utils/{oauth-helper.js → oauthHelper.js} +127 -90
  131. package/build/utils/other/compliance.js +18 -38
  132. package/build/utils/other/identity.js +2 -2
  133. package/build/utils/other/translation.js +4 -4
  134. package/build/utils/other/vero.js +36 -20
  135. package/build/utils/schemaHelpers.js +22 -0
  136. package/build/utils/scopeHelper.js +270 -0
  137. package/build/utils/securityChecker.js +316 -0
  138. package/build/utils/{setup-validator.js → setupValidator.js} +113 -94
  139. package/build/utils/{setup-wizard.js → setupWizard.js} +57 -46
  140. package/build/utils/{token-utils.js → tokenUtils.js} +2 -2
  141. package/build/utils/trading/trading.js +35 -0
  142. package/build/utils/typeGuards.js +12 -0
  143. package/build/utils/version.js +65 -29
  144. package/package.json +10 -8
  145. package/build/api/client-trading.js +0 -124
  146. package/build/api/communication/shared.js +0 -59
  147. package/build/api/shared/query-params.js +0 -16
  148. package/build/auth/credential-session.js +0 -166
  149. package/build/auth/oauth-middleware.js +0 -100
  150. package/build/auth/token-verifier.js +0 -186
  151. package/build/schemas/other/other-apis.js +0 -390
  152. package/build/scripts/update-api-status-doc.js +0 -44
  153. package/build/server-http.js +0 -85
  154. package/build/tools/definitions/marketing.js +0 -1381
  155. package/build/tools/tool-handlers/marketing.js +0 -312
  156. package/build/utils/account-management/account.js +0 -818
  157. package/build/utils/api-status-feed.js +0 -84
  158. package/build/utils/cli-ui.js +0 -47
  159. package/build/utils/order-management/dispute.js +0 -369
  160. package/build/utils/order-management/fulfillment.js +0 -205
  161. package/build/utils/other/edelivery.js +0 -235
  162. package/build/utils/schema-helpers.js +0 -13
  163. package/build/utils/scope-helper.js +0 -207
  164. package/build/utils/security-checker.js +0 -248
  165. package/build/utils/type-guards.js +0 -6
  166. /package/build/auth/{oauth-types.js → oauthTypes.js} +0 -0
  167. /package/build/{server-http.d.ts → serverHttp.d.ts} +0 -0
  168. /package/build/tools/ui/{view-models.js → viewModels.js} +0 -0
  169. /package/build/types/{ebay-enums.js → ebayEnums.js} +0 -0
@@ -1,366 +1,239 @@
1
- import { z } from 'zod';
2
- import { defineTool } from '../../tools/define-tool.js';
3
- import { shippingQuoteRequestSchema, veroReportDataSchema } from '../schemas.js';
1
+ import { Effect } from 'effect';
2
+ import { bundleIdInputSchema, createVeroReportInputSchema, edeliveryBodyInputSchema, edeliveryPaginationInputSchema, getActualCostsInputSchema, getAddressPreferencesInputSchema, getConsignPreferencesInputSchema, getHandoverSheetInputSchema, getLabelsInputSchema, getListingViolationsInputSchema, getListingViolationsSummaryInputSchema, getPackagesByLineItemIdInputSchema, getTrackingInputSchema, getUserInputSchema, getVeroReasonCodeInputSchema, getVeroReasonCodesInputSchema, getVeroReportInputSchema, getVeroReportItemsInputSchema, packageIdInputSchema, translateInputSchema, } from '../../schemas/other/otherApis.js';
3
+ import { defineTool } from '../../tools/defineTool.js';
4
4
  /** Miscellaneous eBay API tools that do not fit the primary seller API categories. */
5
5
  export const otherEntries = [
6
6
  // Identity API
7
7
  defineTool({
8
8
  name: 'ebay_get_user',
9
9
  description: 'Get user identity information',
10
- inputSchema: {},
11
- handler: (api) => api.identity.getUser(),
10
+ inputSchema: getUserInputSchema.shape,
11
+ handler: (api, args) => Effect.runPromise(api.identity.getUser(args)),
12
12
  }),
13
- // Compliance API
13
+ // Compliance API — decommissioned by eBay on 2026-03-30 (no API replacement).
14
+ // Tools stay registered so callers get a clear failure instead of a bare 404.
14
15
  defineTool({
15
16
  name: 'ebay_get_listing_violations',
16
- description: 'Get listing violations for the seller',
17
- inputSchema: {
18
- complianceType: z.string().optional().describe('Type of compliance violation'),
19
- offset: z.number().optional().describe('Number of violations to skip'),
20
- limit: z.number().optional().describe('Number of violations to return'),
21
- },
22
- handler: (api, args) => api.compliance.getListingViolations(args.complianceType, args.offset, args.limit),
17
+ description: 'DECOMMISSIONED: eBay shut down the Sell Compliance API on 2026-03-30. This tool always fails with a clear message. Use Seller Hub → Performance → Issue Resolution Center instead (no API equivalent).',
18
+ inputSchema: getListingViolationsInputSchema.shape,
19
+ handler: (api, args) => Effect.runPromise(api.compliance.getListingViolations(args)),
23
20
  }),
24
21
  defineTool({
25
22
  name: 'ebay_get_listing_violations_summary',
26
- description: 'Get summary of listing violations',
27
- inputSchema: {
28
- complianceType: z.string().optional().describe('Type of compliance violation'),
29
- },
30
- handler: (api, args) => api.compliance.getListingViolationsSummary(args.complianceType),
31
- }),
32
- defineTool({
33
- name: 'ebay_suppress_violation',
34
- description: 'Suppress a listing violation',
35
- inputSchema: {
36
- listingViolationId: z.string().describe('The violation ID to suppress'),
37
- },
38
- handler: (api, args) => api.compliance.suppressViolation(args.listingViolationId),
23
+ description: 'DECOMMISSIONED: eBay shut down the Sell Compliance API on 2026-03-30. This tool always fails with a clear message. Use Seller Hub → Performance → Issue Resolution Center instead (no API equivalent).',
24
+ inputSchema: getListingViolationsSummaryInputSchema.shape,
25
+ handler: (api, args) => Effect.runPromise(api.compliance.getListingViolationsSummary(args)),
39
26
  }),
40
27
  // VERO API
41
28
  defineTool({
42
29
  name: 'ebay_create_vero_report',
43
30
  description: 'Create a VERO report to report intellectual property infringement. This endpoint is part of the Verified Rights Owner (VeRO) Program and allows rights owners to report listings that infringe on their intellectual property.',
44
- inputSchema: {
45
- reportData: veroReportDataSchema.describe('VERO report data containing item details and intellectual property violation information'),
46
- },
47
- handler: (api, args) => api.vero.createVeroReport(args.reportData),
31
+ inputSchema: createVeroReportInputSchema.shape,
32
+ handler: (api, args) => Effect.runPromise(api.vero.createVeroReport(args)),
48
33
  }),
49
34
  defineTool({
50
35
  name: 'ebay_get_vero_report',
51
36
  description: 'Get a specific VERO report by ID',
52
- inputSchema: {
53
- veroReportId: z.string().min(1).describe('The unique identifier of the VERO report'),
54
- },
55
- handler: (api, args) => api.vero.getVeroReport(args.veroReportId),
37
+ inputSchema: getVeroReportInputSchema.shape,
38
+ handler: (api, args) => Effect.runPromise(api.vero.getVeroReport(args)),
56
39
  }),
57
40
  defineTool({
58
41
  name: 'ebay_get_vero_report_items',
59
42
  description: 'Get VERO report items (listings reported for intellectual property infringement). Supports filtering, pagination via limit and offset parameters.',
60
- inputSchema: {
61
- filter: z.string().optional().describe('Filter criteria for the query (e.g., date range)'),
62
- limit: z.number().optional().describe('Maximum number of items to return'),
63
- offset: z.number().optional().describe('Number of items to skip for pagination'),
64
- },
65
- handler: (api, args) => api.vero.getVeroReportItems(args.filter, args.limit, args.offset),
43
+ inputSchema: getVeroReportItemsInputSchema.shape,
44
+ handler: (api, args) => Effect.runPromise(api.vero.getVeroReportItems(args)),
66
45
  }),
67
46
  defineTool({
68
47
  name: 'ebay_get_vero_reason_code',
69
48
  description: 'Get a specific VERO reason code by ID. Reason codes categorize the types of intellectual property violations.',
70
- inputSchema: {
71
- veroReasonCodeId: z.string().min(1).describe('The unique identifier of the VERO reason code'),
72
- },
73
- handler: (api, args) => api.vero.getVeroReasonCode(args.veroReasonCodeId),
49
+ inputSchema: getVeroReasonCodeInputSchema.shape,
50
+ handler: (api, args) => Effect.runPromise(api.vero.getVeroReasonCode(args)),
74
51
  }),
75
52
  defineTool({
76
53
  name: 'ebay_get_vero_reason_codes',
77
54
  description: 'Get all available VERO reason codes. These codes are used when creating VERO reports to specify the type of intellectual property violation.',
78
- inputSchema: {},
79
- handler: (api) => api.vero.getVeroReasonCodes(),
55
+ inputSchema: getVeroReasonCodesInputSchema.shape,
56
+ handler: (api, args) => Effect.runPromise(api.vero.getVeroReasonCodes(args)),
80
57
  }),
81
58
  // Translation API
82
59
  defineTool({
83
60
  name: 'ebay_translate',
84
61
  description: 'Translate listing text',
85
- inputSchema: {
86
- from: z.string().describe('Source language code'),
87
- to: z.string().describe('Target language code'),
88
- translationContext: z
89
- .string()
90
- .describe('Translation context (e.g., ITEM_TITLE, ITEM_DESCRIPTION)'),
91
- text: z.array(z.string()).describe('Array of text to translate'),
92
- },
93
- handler: (api, args) => api.translation.translate(args.from, args.to, args.translationContext, args.text),
94
- }),
95
- // eDelivery API
96
- defineTool({
97
- name: 'ebay_create_shipping_quote',
98
- description: 'Create a shipping quote for international shipping',
99
- inputSchema: {
100
- shippingQuoteRequest: shippingQuoteRequestSchema.describe('Shipping quote request details'),
101
- },
102
- handler: (api, args) => api.edelivery.createShippingQuote(args.shippingQuoteRequest),
103
- }),
104
- defineTool({
105
- name: 'ebay_get_shipping_quote',
106
- description: 'Get a shipping quote by ID',
107
- inputSchema: {
108
- shippingQuoteId: z.string().describe('The shipping quote ID'),
109
- },
110
- handler: (api, args) => api.edelivery.getShippingQuote(args.shippingQuoteId),
62
+ inputSchema: translateInputSchema.shape,
63
+ handler: (api, args) => Effect.runPromise(api.translation.translate(args)),
111
64
  }),
112
65
  // eDelivery API - Cost & Preferences
113
66
  defineTool({
114
67
  name: 'ebay_get_actual_costs',
115
68
  description: 'Get actual costs for shipped packages',
116
- inputSchema: {
117
- params: z.record(z.string()).optional().describe('Query parameters (e.g., package_id)'),
118
- },
119
- handler: (api, args) => api.edelivery.getActualCosts(args.params),
69
+ inputSchema: getActualCostsInputSchema.shape,
70
+ handler: (api, args) => Effect.runPromise(api.edelivery.getActualCosts(args)),
120
71
  }),
121
72
  defineTool({
122
73
  name: 'ebay_get_address_preferences',
123
74
  description: 'Get address preferences for international shipping',
124
- inputSchema: {},
125
- handler: (api) => api.edelivery.getAddressPreferences(),
75
+ inputSchema: getAddressPreferencesInputSchema.shape,
76
+ handler: (api, args) => Effect.runPromise(api.edelivery.getAddressPreferences(args)),
126
77
  }),
127
78
  defineTool({
128
79
  name: 'ebay_create_address_preference',
129
80
  description: 'Create an address preference for international shipping',
130
- inputSchema: {
131
- addressPreference: z.record(z.unknown()).describe('Address preference data'),
132
- },
133
- handler: (api, args) => api.edelivery.createAddressPreference(args.addressPreference),
81
+ inputSchema: edeliveryBodyInputSchema.shape,
82
+ handler: (api, args) => Effect.runPromise(api.edelivery.createAddressPreference(args)),
134
83
  }),
135
84
  defineTool({
136
85
  name: 'ebay_get_consign_preferences',
137
86
  description: 'Get consign preferences for international shipping',
138
- inputSchema: {},
139
- handler: (api) => api.edelivery.getConsignPreferences(),
87
+ inputSchema: getConsignPreferencesInputSchema.shape,
88
+ handler: (api, args) => Effect.runPromise(api.edelivery.getConsignPreferences(args)),
140
89
  }),
141
90
  defineTool({
142
91
  name: 'ebay_create_consign_preference',
143
92
  description: 'Create a consign preference for international shipping',
144
- inputSchema: {
145
- consignPreference: z.record(z.unknown()).describe('Consign preference data'),
146
- },
147
- handler: (api, args) => api.edelivery.createConsignPreference(args.consignPreference),
93
+ inputSchema: edeliveryBodyInputSchema.shape,
94
+ handler: (api, args) => Effect.runPromise(api.edelivery.createConsignPreference(args)),
148
95
  }),
149
96
  // eDelivery API - Agents & Services
150
97
  defineTool({
151
98
  name: 'ebay_get_agents',
152
99
  description: 'Get available shipping agents for international shipping',
153
- inputSchema: {
154
- params: z.record(z.string()).optional().describe('Query parameters (e.g., country)'),
155
- },
156
- handler: (api, args) => api.edelivery.getAgents(args.params),
100
+ inputSchema: edeliveryPaginationInputSchema.shape,
101
+ handler: (api, args) => Effect.runPromise(api.edelivery.getAgents(args)),
157
102
  }),
158
103
  defineTool({
159
104
  name: 'ebay_get_battery_qualifications',
160
105
  description: 'Get battery qualifications for international shipping',
161
- inputSchema: {
162
- params: z.record(z.string()).optional().describe('Query parameters (e.g., battery_type)'),
163
- },
164
- handler: (api, args) => api.edelivery.getBatteryQualifications(args.params),
106
+ inputSchema: edeliveryPaginationInputSchema.shape,
107
+ handler: (api, args) => Effect.runPromise(api.edelivery.getBatteryQualifications(args)),
165
108
  }),
166
109
  defineTool({
167
110
  name: 'ebay_get_dropoff_sites',
168
111
  description: 'Get available dropoff sites for international shipping',
169
- inputSchema: {
170
- params: z.record(z.string()).describe('Query parameters (postal_code, country required)'),
171
- },
172
- handler: (api, args) => api.edelivery.getDropoffSites(args.params),
112
+ inputSchema: edeliveryPaginationInputSchema.shape,
113
+ handler: (api, args) => Effect.runPromise(api.edelivery.getDropoffSites(args)),
173
114
  }),
174
115
  defineTool({
175
- name: 'ebay_get_shipping_services',
116
+ name: 'ebay_get_services',
176
117
  description: 'Get available shipping services for international shipping',
177
- inputSchema: {
178
- params: z.record(z.string()).optional().describe('Query parameters (e.g., country)'),
179
- },
180
- handler: (api, args) => api.edelivery.getShippingServices(args.params),
118
+ inputSchema: edeliveryPaginationInputSchema.shape,
119
+ handler: (api, args) => Effect.runPromise(api.edelivery.getServices(args)),
181
120
  }),
182
121
  // eDelivery API - Bundles
183
122
  defineTool({
184
123
  name: 'ebay_create_bundle',
185
124
  description: 'Create a bundle of packages for international shipping',
186
- inputSchema: {
187
- bundleRequest: z.record(z.unknown()).describe('Bundle creation data'),
188
- },
189
- handler: (api, args) => api.edelivery.createBundle(args.bundleRequest),
125
+ inputSchema: edeliveryBodyInputSchema.shape,
126
+ handler: (api, args) => Effect.runPromise(api.edelivery.createBundle(args)),
190
127
  }),
191
128
  defineTool({
192
129
  name: 'ebay_get_bundle',
193
130
  description: 'Get bundle details by ID',
194
- inputSchema: {
195
- bundleId: z.string().describe('The bundle ID'),
196
- },
197
- handler: (api, args) => api.edelivery.getBundle(args.bundleId),
131
+ inputSchema: bundleIdInputSchema.shape,
132
+ handler: (api, args) => Effect.runPromise(api.edelivery.getBundle(args)),
198
133
  }),
199
134
  defineTool({
200
135
  name: 'ebay_cancel_bundle',
201
136
  description: 'Cancel a bundle by ID',
202
- inputSchema: {
203
- bundleId: z.string().describe('The bundle ID to cancel'),
204
- },
205
- handler: (api, args) => api.edelivery.cancelBundle(args.bundleId),
137
+ inputSchema: bundleIdInputSchema.shape,
138
+ handler: (api, args) => Effect.runPromise(api.edelivery.cancelBundle(args)),
206
139
  }),
207
140
  defineTool({
208
141
  name: 'ebay_get_bundle_label',
209
142
  description: 'Get shipping label for a bundle',
210
- inputSchema: {
211
- bundleId: z.string().describe('The bundle ID'),
212
- },
213
- handler: (api, args) => api.edelivery.getBundleLabel(args.bundleId),
143
+ inputSchema: bundleIdInputSchema.shape,
144
+ handler: (api, args) => Effect.runPromise(api.edelivery.getBundleLabel(args)),
214
145
  }),
215
146
  // eDelivery API - Packages (Single)
216
147
  defineTool({
217
148
  name: 'ebay_create_package',
218
149
  description: 'Create a package for international shipping',
219
- inputSchema: {
220
- packageRequest: z.record(z.unknown()).describe('Package creation data'),
221
- },
222
- handler: (api, args) => api.edelivery.createPackage(args.packageRequest),
150
+ inputSchema: edeliveryBodyInputSchema.shape,
151
+ handler: (api, args) => Effect.runPromise(api.edelivery.createPackage(args)),
223
152
  }),
224
153
  defineTool({
225
154
  name: 'ebay_get_package',
226
155
  description: 'Get package details by ID',
227
- inputSchema: {
228
- packageId: z.string().describe('The package ID'),
229
- },
230
- handler: (api, args) => api.edelivery.getPackage(args.packageId),
156
+ inputSchema: packageIdInputSchema.shape,
157
+ handler: (api, args) => Effect.runPromise(api.edelivery.getPackage(args)),
231
158
  }),
232
159
  defineTool({
233
160
  name: 'ebay_delete_package',
234
161
  description: 'Delete a package by ID',
235
- inputSchema: {
236
- packageId: z.string().describe('The package ID to delete'),
237
- },
238
- handler: (api, args) => api.edelivery.deletePackage(args.packageId),
162
+ inputSchema: packageIdInputSchema.shape,
163
+ handler: (api, args) => Effect.runPromise(api.edelivery.deletePackage(args)),
239
164
  }),
240
165
  defineTool({
241
- name: 'ebay_get_package_by_order_line_item',
166
+ name: 'ebay_get_packages_by_line_item_id',
242
167
  description: 'Get package details by order line item ID',
243
- inputSchema: {
244
- orderLineItemId: z.string().describe('The order line item ID'),
245
- },
246
- handler: (api, args) => api.edelivery.getPackageByOrderLineItem(args.orderLineItemId),
168
+ inputSchema: getPackagesByLineItemIdInputSchema.shape,
169
+ handler: (api, args) => Effect.runPromise(api.edelivery.getPackagesByLineItemId(args)),
247
170
  }),
248
171
  defineTool({
249
172
  name: 'ebay_cancel_package',
250
173
  description: 'Cancel a package by ID',
251
- inputSchema: {
252
- packageId: z.string().describe('The package ID to cancel'),
253
- },
254
- handler: (api, args) => api.edelivery.cancelPackage(args.packageId),
174
+ inputSchema: packageIdInputSchema.shape,
175
+ handler: (api, args) => Effect.runPromise(api.edelivery.cancelPackage(args)),
255
176
  }),
256
177
  defineTool({
257
178
  name: 'ebay_clone_package',
258
179
  description: 'Clone a package to create a duplicate',
259
- inputSchema: {
260
- packageId: z.string().describe('The package ID to clone'),
261
- },
262
- handler: (api, args) => api.edelivery.clonePackage(args.packageId),
180
+ inputSchema: packageIdInputSchema.shape,
181
+ handler: (api, args) => Effect.runPromise(api.edelivery.clonePackage(args)),
263
182
  }),
264
183
  defineTool({
265
184
  name: 'ebay_confirm_package',
266
185
  description: 'Confirm a package for shipping',
267
- inputSchema: {
268
- packageId: z.string().describe('The package ID to confirm'),
269
- },
270
- handler: (api, args) => api.edelivery.confirmPackage(args.packageId),
186
+ inputSchema: packageIdInputSchema.shape,
187
+ handler: (api, args) => Effect.runPromise(api.edelivery.confirmPackage(args)),
271
188
  }),
272
189
  // eDelivery API - Packages (Bulk)
273
190
  defineTool({
274
191
  name: 'ebay_bulk_cancel_packages',
275
192
  description: 'Cancel multiple packages in one request',
276
- inputSchema: {
277
- bulkCancelRequest: z.record(z.unknown()).describe('Bulk cancel request data'),
278
- },
279
- handler: (api, args) => api.edelivery.bulkCancelPackages(args.bulkCancelRequest),
193
+ inputSchema: edeliveryBodyInputSchema.shape,
194
+ handler: (api, args) => Effect.runPromise(api.edelivery.bulkCancelPackages(args)),
280
195
  }),
281
196
  defineTool({
282
197
  name: 'ebay_bulk_confirm_packages',
283
198
  description: 'Confirm multiple packages in one request',
284
- inputSchema: {
285
- bulkConfirmRequest: z.record(z.unknown()).describe('Bulk confirm request data'),
286
- },
287
- handler: (api, args) => api.edelivery.bulkConfirmPackages(args.bulkConfirmRequest),
199
+ inputSchema: edeliveryBodyInputSchema.shape,
200
+ handler: (api, args) => Effect.runPromise(api.edelivery.bulkConfirmPackages(args)),
288
201
  }),
289
202
  defineTool({
290
203
  name: 'ebay_bulk_delete_packages',
291
204
  description: 'Delete multiple packages in one request',
292
- inputSchema: {
293
- bulkDeleteRequest: z.record(z.unknown()).describe('Bulk delete request data'),
294
- },
295
- handler: (api, args) => api.edelivery.bulkDeletePackages(args.bulkDeleteRequest),
205
+ inputSchema: edeliveryBodyInputSchema.shape,
206
+ handler: (api, args) => Effect.runPromise(api.edelivery.bulkDeletePackages(args)),
296
207
  }),
297
208
  // eDelivery API - Labels & Tracking
298
209
  defineTool({
299
210
  name: 'ebay_get_labels',
300
211
  description: 'Get shipping labels for packages',
301
- inputSchema: {
302
- params: z.record(z.string()).optional().describe('Query parameters (e.g., package_id)'),
303
- },
304
- handler: (api, args) => api.edelivery.getLabels(args.params),
212
+ inputSchema: getLabelsInputSchema.shape,
213
+ handler: (api, args) => Effect.runPromise(api.edelivery.getLabels(args)),
305
214
  }),
306
215
  defineTool({
307
216
  name: 'ebay_get_handover_sheet',
308
217
  description: 'Get handover sheet for packages',
309
- inputSchema: {
310
- params: z.record(z.string()).optional().describe('Query parameters (e.g., bundle_id)'),
311
- },
312
- handler: (api, args) => api.edelivery.getHandoverSheet(args.params),
218
+ inputSchema: getHandoverSheetInputSchema.shape,
219
+ handler: (api, args) => Effect.runPromise(api.edelivery.getHandoverSheet(args)),
313
220
  }),
314
221
  defineTool({
315
222
  name: 'ebay_get_tracking',
316
223
  description: 'Get tracking information for packages',
317
- inputSchema: {
318
- params: z.record(z.string()).describe('Query parameters (tracking_number required)'),
319
- },
320
- handler: (api, args) => api.edelivery.getTracking(args.params),
224
+ inputSchema: getTrackingInputSchema.shape,
225
+ handler: (api, args) => Effect.runPromise(api.edelivery.getTracking(args)),
321
226
  }),
322
227
  // eDelivery API - Other
323
228
  defineTool({
324
229
  name: 'ebay_create_complaint',
325
230
  description: 'Create a complaint for international shipping issues',
326
- inputSchema: {
327
- complaintRequest: z.record(z.unknown()).describe('Complaint request data'),
328
- },
329
- outputSchema: {
330
- type: 'object',
331
- properties: {},
332
- description: 'Success response',
333
- },
334
- handler: (api, args) => api.edelivery.createComplaint(args.complaintRequest),
335
- }),
336
- ];
337
- /**
338
- * Handler-only Claude-facing utility tool.
339
- *
340
- * `SearchClaudeCodeDocs` is callable via `executeTool` but intentionally NOT
341
- * advertised in the registered tool list (preserving prior behavior, where its
342
- * definition lived in an un-aggregated `claudeTools` catalog). It is surfaced to
343
- * the registry via `handlerOnlyEntries`, never `allEntries`.
344
- */
345
- export const claudeEntries = [
346
- defineTool({
347
- name: 'SearchClaudeCodeDocs',
348
- description: 'Search across the Claude Code Docs knowledge base to find relevant information, code examples, API references, and guides. Use this tool when you need to answer questions about Claude Code Docs, find specific documentation, understand how features work, or locate implementation details. The search returns contextual content with titles and direct links to the documentation pages.',
349
- inputSchema: {
350
- query: z.string().describe('A query to search the content with.'),
351
- },
231
+ inputSchema: edeliveryBodyInputSchema.shape,
352
232
  outputSchema: {
353
233
  type: 'object',
354
234
  properties: {},
355
235
  description: 'Success response',
356
236
  },
357
- handler: (_api, args) => ({
358
- content: [
359
- {
360
- type: 'text',
361
- text: `Tool 'SearchClaudeCodeDocs' called with query: ${args.query}. This tool is not yet fully implemented.`,
362
- },
363
- ],
364
- }),
237
+ handler: (api, args) => Effect.runPromise(api.edelivery.createComplaint(args)),
365
238
  }),
366
239
  ];
@@ -1,13 +1,30 @@
1
- import { z } from 'zod';
2
- import { defineTool } from '../../tools/define-tool.js';
1
+ import { z } from '../../utils/effectSchema.js';
2
+ import { defineTool } from '../../tools/defineTool.js';
3
+ import { Effect } from 'effect';
4
+ /** Tool input for Taxonomy API getDefaultCategoryTreeId. */
5
+ const getDefaultCategoryTreeIdSchema = z.object({
6
+ marketplaceId: z.string().describe('Marketplace ID (e.g., EBAY_US)'),
7
+ });
8
+ /** Tool input for Taxonomy API getCategoryTree. */
9
+ const getCategoryTreeSchema = z.object({
10
+ categoryTreeId: z.string().describe('Category tree ID'),
11
+ });
12
+ /** Tool input for Taxonomy API getCategorySuggestions. */
13
+ const getCategorySuggestionsSchema = z.object({
14
+ categoryTreeId: z.string().describe('Category tree ID'),
15
+ query: z.string().describe('Search query for category suggestions'),
16
+ });
17
+ /** Tool input for Taxonomy API getItemAspectsForCategory. */
18
+ const getItemAspectsForCategorySchema = z.object({
19
+ categoryTreeId: z.string().describe('Category tree ID'),
20
+ categoryId: z.string().describe('Category ID'),
21
+ });
3
22
  /** Taxonomy API tools for category trees, category suggestions, and compatibility metadata. */
4
23
  export const taxonomyEntries = [
5
24
  defineTool({
6
25
  name: 'ebay_get_default_category_tree_id',
7
26
  description: 'Get the default category tree ID for a marketplace',
8
- inputSchema: {
9
- marketplaceId: z.string().describe('Marketplace ID (e.g., EBAY_US)'),
10
- },
27
+ inputSchema: getDefaultCategoryTreeIdSchema.shape,
11
28
  outputSchema: {
12
29
  type: 'object',
13
30
  properties: {
@@ -16,14 +33,12 @@ export const taxonomyEntries = [
16
33
  },
17
34
  description: 'Default category tree ID response',
18
35
  },
19
- handler: (api, args) => api.taxonomy.getDefaultCategoryTreeId(args.marketplaceId),
36
+ handler: (api, args) => Effect.runPromise(api.taxonomy.getDefaultCategoryTreeId(args)),
20
37
  }),
21
38
  defineTool({
22
39
  name: 'ebay_get_category_tree',
23
40
  description: 'Get category tree by ID',
24
- inputSchema: {
25
- categoryTreeId: z.string().describe('Category tree ID'),
26
- },
41
+ inputSchema: getCategoryTreeSchema.shape,
27
42
  outputSchema: {
28
43
  type: 'object',
29
44
  properties: {
@@ -33,15 +48,12 @@ export const taxonomyEntries = [
33
48
  },
34
49
  description: 'Category tree details',
35
50
  },
36
- handler: (api, args) => api.taxonomy.getCategoryTree(args.categoryTreeId),
51
+ handler: (api, args) => Effect.runPromise(api.taxonomy.getCategoryTree(args)),
37
52
  }),
38
53
  defineTool({
39
54
  name: 'ebay_get_category_suggestions',
40
55
  description: 'Get category suggestions based on query',
41
- inputSchema: {
42
- categoryTreeId: z.string().describe('Category tree ID'),
43
- query: z.string().describe('Search query for category suggestions'),
44
- },
56
+ inputSchema: getCategorySuggestionsSchema.shape,
45
57
  outputSchema: {
46
58
  type: 'object',
47
59
  properties: {
@@ -49,15 +61,12 @@ export const taxonomyEntries = [
49
61
  },
50
62
  description: 'Category suggestions response',
51
63
  },
52
- handler: (api, args) => api.taxonomy.getCategorySuggestions(args.categoryTreeId, args.query),
64
+ handler: (api, args) => Effect.runPromise(api.taxonomy.getCategorySuggestions(args)),
53
65
  }),
54
66
  defineTool({
55
67
  name: 'ebay_get_item_aspects_for_category',
56
68
  description: 'Get item aspects for a specific category',
57
- inputSchema: {
58
- categoryTreeId: z.string().describe('Category tree ID'),
59
- categoryId: z.string().describe('Category ID'),
60
- },
69
+ inputSchema: getItemAspectsForCategorySchema.shape,
61
70
  outputSchema: {
62
71
  type: 'object',
63
72
  properties: {
@@ -65,6 +74,6 @@ export const taxonomyEntries = [
65
74
  },
66
75
  description: 'Item aspects for category',
67
76
  },
68
- handler: (api, args) => api.taxonomy.getItemAspectsForCategory(args.categoryTreeId, args.categoryId),
77
+ handler: (api, args) => Effect.runPromise(api.taxonomy.getItemAspectsForCategory(args)),
69
78
  }),
70
79
  ];