ebay-mcp-remote-edition 1.0.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 (129) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +755 -0
  3. package/build/api/account-management/account.js +301 -0
  4. package/build/api/analytics-and-report/analytics.js +102 -0
  5. package/build/api/client-trading.js +96 -0
  6. package/build/api/client.js +173 -0
  7. package/build/api/communication/feedback.js +119 -0
  8. package/build/api/communication/message.js +131 -0
  9. package/build/api/communication/negotiation.js +97 -0
  10. package/build/api/communication/notification.js +373 -0
  11. package/build/api/developer/developer.js +81 -0
  12. package/build/api/index.js +109 -0
  13. package/build/api/listing-management/inventory.js +640 -0
  14. package/build/api/listing-metadata/metadata.js +485 -0
  15. package/build/api/listing-metadata/taxonomy.js +58 -0
  16. package/build/api/marketing-and-promotions/marketing.js +768 -0
  17. package/build/api/marketing-and-promotions/recommendation.js +32 -0
  18. package/build/api/order-management/dispute.js +69 -0
  19. package/build/api/order-management/fulfillment.js +89 -0
  20. package/build/api/other/compliance.js +47 -0
  21. package/build/api/other/edelivery.js +219 -0
  22. package/build/api/other/identity.js +24 -0
  23. package/build/api/other/translation.js +22 -0
  24. package/build/api/other/vero.js +48 -0
  25. package/build/api/trading/trading.js +78 -0
  26. package/build/auth/kv-store.js +40 -0
  27. package/build/auth/multi-user-store.js +120 -0
  28. package/build/auth/oauth-metadata.js +59 -0
  29. package/build/auth/oauth-middleware.js +99 -0
  30. package/build/auth/oauth-types.js +4 -0
  31. package/build/auth/oauth.js +235 -0
  32. package/build/auth/scope-utils.js +304 -0
  33. package/build/auth/token-store.js +46 -0
  34. package/build/auth/token-verifier.js +172 -0
  35. package/build/config/environment.js +297 -0
  36. package/build/index.d.ts +1 -0
  37. package/build/index.js +129 -0
  38. package/build/schemas/account-management/account.js +375 -0
  39. package/build/schemas/analytics/analytics.js +191 -0
  40. package/build/schemas/communication/messages.js +345 -0
  41. package/build/schemas/fulfillment/orders.js +338 -0
  42. package/build/schemas/index.js +68 -0
  43. package/build/schemas/inventory-management/inventory.js +471 -0
  44. package/build/schemas/marketing/marketing.js +1103 -0
  45. package/build/schemas/metadata/metadata.js +618 -0
  46. package/build/schemas/other/other-apis.js +390 -0
  47. package/build/schemas/taxonomy/taxonomy.js +575 -0
  48. package/build/scripts/auto-setup.js +364 -0
  49. package/build/scripts/dev-sync.js +512 -0
  50. package/build/scripts/diagnostics.js +301 -0
  51. package/build/scripts/download-specs.js +116 -0
  52. package/build/scripts/interactive-setup.js +757 -0
  53. package/build/scripts/setup.js +1515 -0
  54. package/build/scripts/update-api-status-doc.js +44 -0
  55. package/build/server-http.d.ts +1 -0
  56. package/build/server-http.js +581 -0
  57. package/build/tools/definitions/account-with-schemas.js +170 -0
  58. package/build/tools/definitions/account.js +428 -0
  59. package/build/tools/definitions/analytics.js +66 -0
  60. package/build/tools/definitions/communication.js +394 -0
  61. package/build/tools/definitions/developer.js +195 -0
  62. package/build/tools/definitions/fulfillment.js +326 -0
  63. package/build/tools/definitions/index.js +41 -0
  64. package/build/tools/definitions/inventory.js +464 -0
  65. package/build/tools/definitions/marketing.js +1486 -0
  66. package/build/tools/definitions/metadata.js +188 -0
  67. package/build/tools/definitions/other.js +309 -0
  68. package/build/tools/definitions/taxonomy.js +64 -0
  69. package/build/tools/definitions/token-management.js +148 -0
  70. package/build/tools/definitions/trading.js +71 -0
  71. package/build/tools/index.js +1200 -0
  72. package/build/tools/schemas.js +667 -0
  73. package/build/tools/tool-definitions.js +3534 -0
  74. package/build/types/application-settings/developerAnalyticsV1BetaOas3.js +5 -0
  75. package/build/types/application-settings/developerClientRegistrationV1Oas3.js +5 -0
  76. package/build/types/application-settings/developerKeyManagementV1Oas3.js +5 -0
  77. package/build/types/ebay-enums.js +1330 -0
  78. package/build/types/ebay.js +123 -0
  79. package/build/types/index.js +10 -0
  80. package/build/types/sell-apps/account-management/sellAccountV1Oas3.js +5 -0
  81. package/build/types/sell-apps/analytics-and-report/sellAnalyticsV1Oas3.js +5 -0
  82. package/build/types/sell-apps/communication/commerceFeedbackV1BetaOas3.js +5 -0
  83. package/build/types/sell-apps/communication/commerceMessageV1Oas3.js +5 -0
  84. package/build/types/sell-apps/communication/commerceNotificationV1Oas3.js +5 -0
  85. package/build/types/sell-apps/communication/sellNegotiationV1Oas3.js +5 -0
  86. package/build/types/sell-apps/listing-management/sellInventoryV1Oas3.js +5 -0
  87. package/build/types/sell-apps/listing-metadata/sellMetadataV1Oas3.js +5 -0
  88. package/build/types/sell-apps/markeitng-and-promotions/sellMarketingV1Oas3.js +5 -0
  89. package/build/types/sell-apps/markeitng-and-promotions/sellRecommendationV1Oas3.js +5 -0
  90. package/build/types/sell-apps/order-management/sellFulfillmentV1Oas3.js +5 -0
  91. package/build/types/sell-apps/other-apis/commerceIdentityV1Oas3.js +5 -0
  92. package/build/types/sell-apps/other-apis/commerceTranslationV1BetaOas3.js +5 -0
  93. package/build/types/sell-apps/other-apis/commerceVeroV1Oas3.js +5 -0
  94. package/build/types/sell-apps/other-apis/sellComplianceV1Oas3.js +5 -0
  95. package/build/types/sell-apps/other-apis/sellEdeliveryInternationalShippingOas3.js +5 -0
  96. package/build/types/sell-apps/other-apis/sellMarketingV1Oas3.js +5 -0
  97. package/build/types/sell-apps/other-apis/sellRecommendationV1Oas3.js +5 -0
  98. package/build/utils/account-management/account.js +831 -0
  99. package/build/utils/api-status-feed.js +83 -0
  100. package/build/utils/communication/feedback.js +216 -0
  101. package/build/utils/communication/message.js +242 -0
  102. package/build/utils/communication/negotiation.js +150 -0
  103. package/build/utils/communication/notification.js +369 -0
  104. package/build/utils/date-converter.js +160 -0
  105. package/build/utils/llm-client-detector.js +758 -0
  106. package/build/utils/logger.js +198 -0
  107. package/build/utils/oauth-helper.js +315 -0
  108. package/build/utils/order-management/dispute.js +369 -0
  109. package/build/utils/order-management/fulfillment.js +205 -0
  110. package/build/utils/other/compliance.js +76 -0
  111. package/build/utils/other/edelivery.js +241 -0
  112. package/build/utils/other/identity.js +13 -0
  113. package/build/utils/other/translation.js +41 -0
  114. package/build/utils/other/vero.js +90 -0
  115. package/build/utils/scope-helper.js +207 -0
  116. package/build/utils/security-checker.js +248 -0
  117. package/build/utils/setup-validator.js +305 -0
  118. package/build/utils/token-utils.js +40 -0
  119. package/build/utils/version.js +56 -0
  120. package/docs/auth/production_scopes.json +111 -0
  121. package/docs/auth/sandbox_scopes.json +142 -0
  122. package/package.json +122 -0
  123. package/public/icons/1024x1024.png +0 -0
  124. package/public/icons/128x128.png +0 -0
  125. package/public/icons/16x16.png +0 -0
  126. package/public/icons/256x256.png +0 -0
  127. package/public/icons/32x32.png +0 -0
  128. package/public/icons/48x48.png +0 -0
  129. package/public/icons/512x512.png +0 -0
@@ -0,0 +1,170 @@
1
+ /**
2
+ * Example: Account Management Tools with Full Schema Integration
3
+ *
4
+ * This file demonstrates how to integrate the new Zod schemas
5
+ * for both input and output validation with MCP tools.
6
+ */
7
+ import { MarketplaceId } from '../../types/ebay-enums.js';
8
+ import { z } from 'zod';
9
+ // Import schemas from the new schemas folder
10
+ import { getCustomPoliciesInputSchema, getFulfillmentPoliciesInputSchema, createFulfillmentPolicyInputSchema, getPaymentPoliciesInputSchema, createPaymentPolicyInputSchema, getReturnPoliciesInputSchema, createReturnPolicyInputSchema, } from '../../schemas/account-management/account.js';
11
+ /**
12
+ * Account Management Tools with Output Schema Validation
13
+ *
14
+ * These tool definitions include both inputSchema and outputSchema
15
+ * for complete request/response validation.
16
+ */
17
+ export const accountToolsWithSchemas = [
18
+ // ============================================================================
19
+ // Custom Policies
20
+ // ============================================================================
21
+ {
22
+ name: 'ebay_get_custom_policies',
23
+ description: 'Retrieve custom policies defined for the seller account',
24
+ inputSchema: {
25
+ policyTypes: getCustomPoliciesInputSchema.shape.policyTypes,
26
+ },
27
+ },
28
+ // ============================================================================
29
+ // Fulfillment Policies
30
+ // ============================================================================
31
+ {
32
+ name: 'ebay_get_fulfillment_policies',
33
+ description: 'Get fulfillment policies for the seller.\n\nRequired OAuth Scope: sell.account.readonly or sell.account\nMinimum Scope: https://api.ebay.com/oauth/api_scope/sell.account.readonly',
34
+ inputSchema: {
35
+ marketplaceId: getFulfillmentPoliciesInputSchema.shape.marketplaceId,
36
+ },
37
+ },
38
+ {
39
+ name: 'ebay_create_fulfillment_policy',
40
+ description: 'Create a new fulfillment policy.\n\nRequired OAuth Scope: sell.account\nMinimum Scope: https://api.ebay.com/oauth/api_scope/sell.account',
41
+ inputSchema: {
42
+ policy: createFulfillmentPolicyInputSchema.shape.policy,
43
+ },
44
+ },
45
+ {
46
+ name: 'ebay_get_fulfillment_policy',
47
+ description: 'Get a specific fulfillment policy by ID',
48
+ inputSchema: {
49
+ fulfillmentPolicyId: z.string().describe('The fulfillment policy ID'),
50
+ },
51
+ },
52
+ {
53
+ name: 'ebay_get_fulfillment_policy_by_name',
54
+ description: 'Get a fulfillment policy by name',
55
+ inputSchema: {
56
+ marketplaceId: z.nativeEnum(MarketplaceId).describe('eBay marketplace ID'),
57
+ name: z.string().describe('Policy name'),
58
+ },
59
+ },
60
+ {
61
+ name: 'ebay_update_fulfillment_policy',
62
+ description: 'Update an existing fulfillment policy',
63
+ inputSchema: {
64
+ fulfillmentPolicyId: z.string().describe('The fulfillment policy ID'),
65
+ policy: createFulfillmentPolicyInputSchema.shape.policy,
66
+ },
67
+ },
68
+ {
69
+ name: 'ebay_delete_fulfillment_policy',
70
+ description: 'Delete a fulfillment policy',
71
+ inputSchema: {
72
+ fulfillmentPolicyId: z.string().describe('The fulfillment policy ID'),
73
+ },
74
+ },
75
+ // ============================================================================
76
+ // Payment Policies
77
+ // ============================================================================
78
+ {
79
+ name: 'ebay_get_payment_policies',
80
+ description: 'Get payment policies for the seller',
81
+ inputSchema: {
82
+ marketplaceId: getPaymentPoliciesInputSchema.shape.marketplaceId,
83
+ },
84
+ },
85
+ {
86
+ name: 'ebay_create_payment_policy',
87
+ description: 'Create a new payment policy',
88
+ inputSchema: {
89
+ policy: createPaymentPolicyInputSchema.shape.policy,
90
+ },
91
+ },
92
+ // ============================================================================
93
+ // Return Policies
94
+ // ============================================================================
95
+ {
96
+ name: 'ebay_get_return_policies',
97
+ description: 'Get return policies for the seller',
98
+ inputSchema: {
99
+ marketplaceId: getReturnPoliciesInputSchema.shape.marketplaceId,
100
+ },
101
+ },
102
+ {
103
+ name: 'ebay_create_return_policy',
104
+ description: 'Create a new return policy',
105
+ inputSchema: {
106
+ policy: createReturnPolicyInputSchema.shape.policy,
107
+ },
108
+ },
109
+ // ============================================================================
110
+ // Sales Tax
111
+ // ============================================================================
112
+ {
113
+ name: 'ebay_get_sales_taxes',
114
+ description: 'Get all sales tax tables for a country',
115
+ inputSchema: {
116
+ countryCode: z.string().describe('Required: Two-letter ISO 3166-1 country code'),
117
+ },
118
+ },
119
+ {
120
+ name: 'ebay_get_sales_tax',
121
+ description: 'Get sales tax table for a jurisdiction',
122
+ inputSchema: {
123
+ countryCode: z.string().describe('Two-letter ISO 3166 country code'),
124
+ jurisdictionId: z.string().describe('Tax jurisdiction ID'),
125
+ },
126
+ },
127
+ // ============================================================================
128
+ // KYC & Programs
129
+ // ============================================================================
130
+ {
131
+ name: 'ebay_get_kyc',
132
+ description: 'Get seller KYC (Know Your Customer) status',
133
+ inputSchema: {},
134
+ },
135
+ {
136
+ name: 'ebay_get_opted_in_programs',
137
+ description: 'Get seller programs the account is opted into',
138
+ inputSchema: {},
139
+ },
140
+ {
141
+ name: 'ebay_get_privileges',
142
+ description: "Get seller's current set of privileges, including whether or not the seller's eBay registration has been completed, as well as the details of their site-wide sellingLimit (the maximum dollar value and quantity of items a seller can sell per day).\n\nRequired OAuth Scope: sell.account.readonly or sell.account",
143
+ inputSchema: {},
144
+ },
145
+ ];
146
+ /**
147
+ * Example: Using the schemas for runtime validation
148
+ *
149
+ * ```typescript
150
+ * import { accountToolsWithSchemas } from '../../tools/definitions/account-with-schemas';
151
+ * import { EbaySellerApi } from '../../api';
152
+ *
153
+ * async function validateToolExecution() {
154
+ * const api = new EbaySellerApi();
155
+ * const tool = accountToolsWithSchemas.find(t => t.name === 'ebay_get_fulfillment_policies');
156
+ *
157
+ * // Validate input
158
+ * const input = { marketplaceId: 'EBAY_US' };
159
+ * const validatedInput = tool.inputSchema.parse(input); // Throws if invalid
160
+ *
161
+ * // Execute API call
162
+ * const response = await api.account.getFulfillmentPolicies(validatedInput.marketplaceId);
163
+ *
164
+ * // Validate output
165
+ * const validatedOutput = tool.outputSchema?.parse(response); // Throws if invalid
166
+ *
167
+ * return validatedOutput;
168
+ * }
169
+ * ```
170
+ */
@@ -0,0 +1,428 @@
1
+ import { MarketplaceId } from '../../types/ebay-enums.js';
2
+ import { z } from 'zod';
3
+ import { zodToJsonSchema } from 'zod-to-json-schema';
4
+ import { bulkSalesTaxRequestSchema, customPolicySchema, fulfillmentPolicySchema, paymentPolicySchema, programRequestSchema, returnPolicySchema, salesTaxBaseSchema, } from '../schemas.js';
5
+ import { customPolicyResponseSchema, getFulfillmentPoliciesOutputSchema, createFulfillmentPolicyOutputSchema, fulfillmentPolicyResponseSchema, getPaymentPoliciesOutputSchema, createPaymentPolicyOutputSchema, paymentPolicyResponseSchema, getReturnPoliciesOutputSchema, createReturnPolicyOutputSchema, returnPolicyResponseSchema, createCustomPolicyOutputSchema, getSalesTaxesOutputSchema, salesTaxSchema, kycOutputSchema, privilegesOutputSchema, programsOutputSchema, } from '../../schemas/account-management/account.js';
6
+ export const accountTools = [
7
+ {
8
+ name: 'ebay_get_custom_policies',
9
+ description: 'Retrieve custom policies defined for the seller account',
10
+ inputSchema: {
11
+ policyTypes: z
12
+ .string()
13
+ .optional()
14
+ .describe('Comma-delimited list of policy types to retrieve'),
15
+ },
16
+ outputSchema: zodToJsonSchema(customPolicyResponseSchema, {
17
+ name: 'CustomPoliciesResponse',
18
+ $refStrategy: 'none',
19
+ }),
20
+ },
21
+ {
22
+ name: 'ebay_get_fulfillment_policies',
23
+ description: 'Get fulfillment policies for the seller.\n\nRequired OAuth Scope: sell.account.readonly or sell.account\nMinimum Scope: https://api.ebay.com/oauth/api_scope/sell.account.readonly',
24
+ inputSchema: {
25
+ marketplaceId: z.nativeEnum(MarketplaceId).describe('Required: eBay marketplace ID'),
26
+ },
27
+ outputSchema: zodToJsonSchema(getFulfillmentPoliciesOutputSchema, {
28
+ name: 'FulfillmentPoliciesResponse',
29
+ $refStrategy: 'none',
30
+ }),
31
+ },
32
+ {
33
+ name: 'ebay_get_payment_policies',
34
+ description: 'Get payment policies for the seller',
35
+ inputSchema: {
36
+ marketplaceId: z.nativeEnum(MarketplaceId).describe('Required: eBay marketplace ID'),
37
+ },
38
+ outputSchema: zodToJsonSchema(getPaymentPoliciesOutputSchema, {
39
+ name: 'PaymentPoliciesResponse',
40
+ $refStrategy: 'none',
41
+ }),
42
+ },
43
+ {
44
+ name: 'ebay_get_return_policies',
45
+ description: 'Get return policies for the seller',
46
+ inputSchema: {
47
+ marketplaceId: z.nativeEnum(MarketplaceId).describe('Required: eBay marketplace ID'),
48
+ },
49
+ outputSchema: zodToJsonSchema(getReturnPoliciesOutputSchema, {
50
+ name: 'ReturnPoliciesResponse',
51
+ $refStrategy: 'none',
52
+ }),
53
+ },
54
+ // Fulfillment Policy CRUD
55
+ {
56
+ name: 'ebay_create_fulfillment_policy',
57
+ description: 'Create a new fulfillment policy.\n\nRequired OAuth Scope: sell.account\nMinimum Scope: https://api.ebay.com/oauth/api_scope/sell.account',
58
+ inputSchema: {
59
+ policy: fulfillmentPolicySchema.describe('Fulfillment policy details'),
60
+ },
61
+ outputSchema: zodToJsonSchema(createFulfillmentPolicyOutputSchema, {
62
+ name: 'CreateFulfillmentPolicyResponse',
63
+ $refStrategy: 'none',
64
+ }),
65
+ },
66
+ {
67
+ name: 'ebay_get_fulfillment_policy',
68
+ description: 'Get a specific fulfillment policy by ID',
69
+ inputSchema: {
70
+ fulfillmentPolicyId: z.string().describe('The fulfillment policy ID'),
71
+ },
72
+ outputSchema: zodToJsonSchema(fulfillmentPolicyResponseSchema, {
73
+ name: 'FulfillmentPolicyResponse',
74
+ $refStrategy: 'none',
75
+ }),
76
+ },
77
+ {
78
+ name: 'ebay_get_fulfillment_policy_by_name',
79
+ description: 'Get a fulfillment policy by name',
80
+ inputSchema: {
81
+ marketplaceId: z.nativeEnum(MarketplaceId).describe('eBay marketplace ID'),
82
+ name: z.string().describe('Policy name'),
83
+ },
84
+ outputSchema: zodToJsonSchema(fulfillmentPolicyResponseSchema, {
85
+ name: 'FulfillmentPolicyResponse',
86
+ $refStrategy: 'none',
87
+ }),
88
+ },
89
+ {
90
+ name: 'ebay_update_fulfillment_policy',
91
+ description: 'Update an existing fulfillment policy',
92
+ inputSchema: {
93
+ fulfillmentPolicyId: z.string().describe('The fulfillment policy ID'),
94
+ policy: fulfillmentPolicySchema.describe('Updated fulfillment policy details'),
95
+ },
96
+ outputSchema: zodToJsonSchema(createFulfillmentPolicyOutputSchema, {
97
+ name: 'UpdateFulfillmentPolicyResponse',
98
+ $refStrategy: 'none',
99
+ }),
100
+ },
101
+ {
102
+ name: 'ebay_delete_fulfillment_policy',
103
+ description: 'Delete a fulfillment policy',
104
+ inputSchema: {
105
+ fulfillmentPolicyId: z.string().describe('The fulfillment policy ID'),
106
+ },
107
+ outputSchema: {
108
+ type: 'object',
109
+ properties: {},
110
+ description: 'Empty response on successful deletion (HTTP 204)',
111
+ },
112
+ },
113
+ // Payment Policy CRUD
114
+ {
115
+ name: 'ebay_create_payment_policy',
116
+ description: 'Create a new payment policy',
117
+ inputSchema: {
118
+ policy: paymentPolicySchema.describe('Payment policy details'),
119
+ },
120
+ outputSchema: zodToJsonSchema(createPaymentPolicyOutputSchema, {
121
+ name: 'CreatePaymentPolicyResponse',
122
+ $refStrategy: 'none',
123
+ }),
124
+ },
125
+ {
126
+ name: 'ebay_get_payment_policy',
127
+ description: 'Get a specific payment policy by ID',
128
+ inputSchema: {
129
+ paymentPolicyId: z.string().describe('The payment policy ID'),
130
+ },
131
+ outputSchema: zodToJsonSchema(paymentPolicyResponseSchema, {
132
+ name: 'PaymentPolicyResponse',
133
+ $refStrategy: 'none',
134
+ }),
135
+ },
136
+ {
137
+ name: 'ebay_get_payment_policy_by_name',
138
+ description: 'Get a payment policy by name',
139
+ inputSchema: {
140
+ marketplaceId: z.nativeEnum(MarketplaceId).describe('eBay marketplace ID'),
141
+ name: z.string().describe('Policy name'),
142
+ },
143
+ outputSchema: zodToJsonSchema(paymentPolicyResponseSchema, {
144
+ name: 'PaymentPolicyResponse',
145
+ $refStrategy: 'none',
146
+ }),
147
+ },
148
+ {
149
+ name: 'ebay_update_payment_policy',
150
+ description: 'Update an existing payment policy',
151
+ inputSchema: {
152
+ paymentPolicyId: z.string().describe('The payment policy ID'),
153
+ policy: paymentPolicySchema.describe('Updated payment policy details'),
154
+ },
155
+ outputSchema: zodToJsonSchema(createPaymentPolicyOutputSchema, {
156
+ name: 'UpdatePaymentPolicyResponse',
157
+ $refStrategy: 'none',
158
+ }),
159
+ },
160
+ {
161
+ name: 'ebay_delete_payment_policy',
162
+ description: 'Delete a payment policy',
163
+ inputSchema: {
164
+ paymentPolicyId: z.string().describe('The payment policy ID'),
165
+ },
166
+ outputSchema: {
167
+ type: 'object',
168
+ properties: {},
169
+ description: 'Empty response on successful deletion (HTTP 204)',
170
+ },
171
+ },
172
+ // Return Policy CRUD
173
+ {
174
+ name: 'ebay_create_return_policy',
175
+ description: 'Create a new return policy',
176
+ inputSchema: {
177
+ policy: returnPolicySchema.describe('Return policy details'),
178
+ },
179
+ outputSchema: zodToJsonSchema(createReturnPolicyOutputSchema, {
180
+ name: 'CreateReturnPolicyResponse',
181
+ $refStrategy: 'none',
182
+ }),
183
+ },
184
+ {
185
+ name: 'ebay_get_return_policy',
186
+ description: 'Get a specific return policy by ID',
187
+ inputSchema: {
188
+ returnPolicyId: z.string().describe('The return policy ID'),
189
+ },
190
+ outputSchema: zodToJsonSchema(returnPolicyResponseSchema, {
191
+ name: 'ReturnPolicyResponse',
192
+ $refStrategy: 'none',
193
+ }),
194
+ },
195
+ {
196
+ name: 'ebay_get_return_policy_by_name',
197
+ description: 'Get a return policy by name',
198
+ inputSchema: {
199
+ marketplaceId: z.nativeEnum(MarketplaceId).describe('eBay marketplace ID'),
200
+ name: z.string().describe('Policy name'),
201
+ },
202
+ outputSchema: zodToJsonSchema(returnPolicyResponseSchema, {
203
+ name: 'ReturnPolicyResponse',
204
+ $refStrategy: 'none',
205
+ }),
206
+ },
207
+ {
208
+ name: 'ebay_update_return_policy',
209
+ description: 'Update an existing return policy',
210
+ inputSchema: {
211
+ returnPolicyId: z.string().describe('The return policy ID'),
212
+ policy: returnPolicySchema.describe('Updated return policy details'),
213
+ },
214
+ outputSchema: zodToJsonSchema(createReturnPolicyOutputSchema, {
215
+ name: 'UpdateReturnPolicyResponse',
216
+ $refStrategy: 'none',
217
+ }),
218
+ },
219
+ {
220
+ name: 'ebay_delete_return_policy',
221
+ description: 'Delete a return policy',
222
+ inputSchema: {
223
+ returnPolicyId: z.string().describe('The return policy ID'),
224
+ },
225
+ outputSchema: {
226
+ type: 'object',
227
+ properties: {},
228
+ description: 'Empty response on successful deletion (HTTP 204)',
229
+ },
230
+ },
231
+ // Custom Policy CRUD
232
+ {
233
+ name: 'ebay_create_custom_policy',
234
+ description: 'Create a new custom policy',
235
+ inputSchema: {
236
+ policy: customPolicySchema.describe('Custom policy details'),
237
+ },
238
+ outputSchema: zodToJsonSchema(createCustomPolicyOutputSchema, {
239
+ name: 'CreateCustomPolicyResponse',
240
+ $refStrategy: 'none',
241
+ }),
242
+ },
243
+ {
244
+ name: 'ebay_get_custom_policy',
245
+ description: 'Get a specific custom policy by ID',
246
+ inputSchema: {
247
+ customPolicyId: z.string().describe('The custom policy ID'),
248
+ },
249
+ outputSchema: zodToJsonSchema(createCustomPolicyOutputSchema, {
250
+ name: 'CustomPolicyResponse',
251
+ $refStrategy: 'none',
252
+ }),
253
+ },
254
+ {
255
+ name: 'ebay_update_custom_policy',
256
+ description: 'Update an existing custom policy',
257
+ inputSchema: {
258
+ customPolicyId: z.string().describe('The custom policy ID'),
259
+ policy: customPolicySchema.describe('Updated custom policy details'),
260
+ },
261
+ outputSchema: zodToJsonSchema(createCustomPolicyOutputSchema, {
262
+ name: 'UpdateCustomPolicyResponse',
263
+ $refStrategy: 'none',
264
+ }),
265
+ },
266
+ {
267
+ name: 'ebay_delete_custom_policy',
268
+ description: 'Delete a custom policy',
269
+ inputSchema: {
270
+ customPolicyId: z.string().describe('The custom policy ID'),
271
+ },
272
+ outputSchema: {
273
+ type: 'object',
274
+ properties: {},
275
+ description: 'Empty response on successful deletion (HTTP 204)',
276
+ },
277
+ },
278
+ // KYC, Payments, Programs, Sales Tax, Subscription
279
+ {
280
+ name: 'ebay_get_kyc',
281
+ description: 'Get seller KYC (Know Your Customer) status',
282
+ inputSchema: {},
283
+ outputSchema: zodToJsonSchema(kycOutputSchema, {
284
+ name: 'KYCResponse',
285
+ $refStrategy: 'none',
286
+ }),
287
+ },
288
+ {
289
+ name: 'ebay_opt_in_to_payments_program',
290
+ description: 'Opt-in to a payments program',
291
+ inputSchema: {
292
+ marketplaceId: z.nativeEnum(MarketplaceId).describe('eBay marketplace ID'),
293
+ paymentsProgramType: z.string().describe('Payments program type'),
294
+ },
295
+ },
296
+ {
297
+ name: 'ebay_get_payments_program_status',
298
+ description: 'Get payments program status',
299
+ inputSchema: {
300
+ marketplaceId: z.nativeEnum(MarketplaceId).describe('eBay marketplace ID'),
301
+ paymentsProgramType: z.string().describe('Payments program type'),
302
+ },
303
+ },
304
+ {
305
+ name: 'ebay_get_rate_tables',
306
+ description: 'Get seller rate tables',
307
+ inputSchema: {},
308
+ },
309
+ {
310
+ name: 'ebay_create_or_replace_sales_tax',
311
+ description: 'Create or replace sales tax table for a jurisdiction',
312
+ inputSchema: {
313
+ countryCode: z.string().describe('Two-letter ISO 3166 country code'),
314
+ jurisdictionId: z.string().describe('Tax jurisdiction ID'),
315
+ salesTaxBase: salesTaxBaseSchema.describe('Sales tax details'),
316
+ },
317
+ },
318
+ {
319
+ name: 'ebay_bulk_create_or_replace_sales_tax',
320
+ description: 'Bulk create or replace sales tax tables',
321
+ inputSchema: {
322
+ requests: bulkSalesTaxRequestSchema.describe('Array of sales tax requests'),
323
+ },
324
+ },
325
+ {
326
+ name: 'ebay_delete_sales_tax',
327
+ description: 'Delete sales tax table for a jurisdiction',
328
+ inputSchema: {
329
+ countryCode: z.string().describe('Two-letter ISO 3166 country code'),
330
+ jurisdictionId: z.string().describe('Tax jurisdiction ID'),
331
+ },
332
+ },
333
+ {
334
+ name: 'ebay_get_sales_tax',
335
+ description: 'Get sales tax table for a jurisdiction',
336
+ inputSchema: {
337
+ countryCode: z.string().describe('Two-letter ISO 3166 country code'),
338
+ jurisdictionId: z.string().describe('Tax jurisdiction ID'),
339
+ },
340
+ outputSchema: zodToJsonSchema(salesTaxSchema, {
341
+ name: 'SalesTaxResponse',
342
+ $refStrategy: 'none',
343
+ }),
344
+ },
345
+ {
346
+ name: 'ebay_get_sales_taxes',
347
+ description: 'Get all sales tax tables for a country',
348
+ inputSchema: {
349
+ countryCode: z.string().describe('Required: Two-letter ISO 3166-1 country code'),
350
+ },
351
+ outputSchema: zodToJsonSchema(getSalesTaxesOutputSchema, {
352
+ name: 'GetSalesTaxesResponse',
353
+ $refStrategy: 'none',
354
+ }),
355
+ },
356
+ {
357
+ name: 'ebay_get_subscription',
358
+ description: 'Get seller subscription information',
359
+ inputSchema: {
360
+ limitType: z.string().optional().describe('Optional limit type filter'),
361
+ },
362
+ },
363
+ {
364
+ name: 'ebay_opt_in_to_program',
365
+ description: 'Opt-in to a seller program',
366
+ inputSchema: {
367
+ request: programRequestSchema.describe('Program opt-in request'),
368
+ },
369
+ },
370
+ {
371
+ name: 'ebay_opt_out_of_program',
372
+ description: 'Opt-out of a seller program',
373
+ inputSchema: {
374
+ request: programRequestSchema.describe('Program opt-out request'),
375
+ },
376
+ },
377
+ {
378
+ name: 'ebay_get_opted_in_programs',
379
+ description: 'Get seller programs the account is opted into',
380
+ inputSchema: {},
381
+ outputSchema: zodToJsonSchema(programsOutputSchema, {
382
+ name: 'ProgramsResponse',
383
+ $refStrategy: 'none',
384
+ }),
385
+ },
386
+ {
387
+ name: 'ebay_get_privileges',
388
+ description: "Get seller's current set of privileges, including whether or not the seller's eBay registration has been completed, as well as the details of their site-wide sellingLimit (the maximum dollar value and quantity of items a seller can sell per day).\n\nRequired OAuth Scope: sell.account.readonly or sell.account",
389
+ inputSchema: {},
390
+ outputSchema: zodToJsonSchema(privilegesOutputSchema, {
391
+ name: 'PrivilegesResponse',
392
+ $refStrategy: 'none',
393
+ }),
394
+ },
395
+ {
396
+ name: 'ebay_get_advertising_eligibility',
397
+ description: 'Check the seller eligibility status for eBay advertising programs. This allows developers to determine if a seller is eligible for various advertising programs on eBay.\n\nRequired OAuth Scope: sell.account.readonly or sell.account',
398
+ inputSchema: {
399
+ marketplaceId: z
400
+ .nativeEnum(MarketplaceId)
401
+ .describe('eBay marketplace ID to check eligibility for'),
402
+ programTypes: z
403
+ .string()
404
+ .optional()
405
+ .describe('Optional comma-separated list of program types to check eligibility for'),
406
+ },
407
+ },
408
+ {
409
+ name: 'ebay_get_payments_program',
410
+ description: 'Get payments program status for a marketplace. Note: This method is deprecated as all seller accounts globally have been enabled for the new eBay payment and checkout flow.\n\nRequired OAuth Scope: sell.account.readonly or sell.account',
411
+ inputSchema: {
412
+ marketplaceId: z.nativeEnum(MarketplaceId).describe('The eBay marketplace ID'),
413
+ paymentsProgramType: z
414
+ .string()
415
+ .describe('The type of payments program (e.g., EBAY_PAYMENTS)'),
416
+ },
417
+ },
418
+ {
419
+ name: 'ebay_get_payments_program_onboarding',
420
+ description: 'Get payments program onboarding information. Note: This method is deprecated as all seller accounts globally have been enabled for the new eBay payment and checkout flow.\n\nRequired OAuth Scope: sell.account.readonly or sell.account',
421
+ inputSchema: {
422
+ marketplaceId: z.nativeEnum(MarketplaceId).describe('The eBay marketplace ID'),
423
+ paymentsProgramType: z
424
+ .string()
425
+ .describe('The type of payments program (e.g., EBAY_PAYMENTS)'),
426
+ },
427
+ },
428
+ ];
@@ -0,0 +1,66 @@
1
+ import { z } from 'zod';
2
+ export const analyticsTools = [
3
+ {
4
+ name: 'ebay_get_traffic_report',
5
+ description: 'Get traffic report for listings',
6
+ inputSchema: {
7
+ dimension: z.string().describe('Dimension for the report (e.g., LISTING, DAY)'),
8
+ filter: z.string().describe('Filter criteria'),
9
+ metric: z.string().describe('Metrics to retrieve (e.g., CLICK_THROUGH_RATE, IMPRESSION)'),
10
+ sort: z.string().optional().describe('Sort order'),
11
+ },
12
+ outputSchema: {
13
+ type: 'object',
14
+ properties: {
15
+ records: { type: 'array' },
16
+ warnings: { type: 'array' },
17
+ },
18
+ description: 'Traffic report data',
19
+ },
20
+ },
21
+ {
22
+ name: 'ebay_find_seller_standards_profiles',
23
+ description: 'Find all seller standards profiles',
24
+ inputSchema: {},
25
+ outputSchema: {
26
+ type: 'object',
27
+ properties: {
28
+ standards: { type: 'array' },
29
+ },
30
+ description: 'Seller standards profiles',
31
+ },
32
+ },
33
+ {
34
+ name: 'ebay_get_seller_standards_profile',
35
+ description: 'Get a specific seller standards profile',
36
+ inputSchema: {
37
+ program: z.string().describe('The program (e.g., CUSTOMER_SERVICE)'),
38
+ cycle: z.string().describe('The cycle (e.g., CURRENT)'),
39
+ },
40
+ outputSchema: {
41
+ type: 'object',
42
+ properties: {
43
+ program: { type: 'string' },
44
+ cycle: { type: 'object' },
45
+ metrics: { type: 'array' },
46
+ },
47
+ description: 'Seller standards profile data',
48
+ },
49
+ },
50
+ {
51
+ name: 'ebay_get_customer_service_metric',
52
+ description: 'Get customer service metrics',
53
+ inputSchema: {
54
+ customerServiceMetricType: z.string().describe('Type of metric'),
55
+ evaluationType: z.string().describe('Evaluation type'),
56
+ evaluationMarketplaceId: z.string().describe('Marketplace ID for evaluation'),
57
+ },
58
+ outputSchema: {
59
+ type: 'object',
60
+ properties: {
61
+ metrics: { type: 'array' },
62
+ },
63
+ description: 'Customer service metric data',
64
+ },
65
+ },
66
+ ];