ebay-mcp 1.4.3

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 (205) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +586 -0
  3. package/build/api/account-management/account.d.ts +216 -0
  4. package/build/api/account-management/account.js +305 -0
  5. package/build/api/analytics-and-report/analytics.d.ts +33 -0
  6. package/build/api/analytics-and-report/analytics.js +102 -0
  7. package/build/api/client.d.ts +89 -0
  8. package/build/api/client.js +343 -0
  9. package/build/api/communication/feedback.d.ts +45 -0
  10. package/build/api/communication/feedback.js +119 -0
  11. package/build/api/communication/message.d.ts +55 -0
  12. package/build/api/communication/message.js +131 -0
  13. package/build/api/communication/negotiation.d.ts +39 -0
  14. package/build/api/communication/negotiation.js +97 -0
  15. package/build/api/communication/notification.d.ts +128 -0
  16. package/build/api/communication/notification.js +373 -0
  17. package/build/api/index.d.ts +96 -0
  18. package/build/api/index.js +121 -0
  19. package/build/api/listing-management/inventory.d.ts +216 -0
  20. package/build/api/listing-management/inventory.js +633 -0
  21. package/build/api/listing-metadata/metadata.d.ts +154 -0
  22. package/build/api/listing-metadata/metadata.js +485 -0
  23. package/build/api/listing-metadata/taxonomy.d.ts +38 -0
  24. package/build/api/listing-metadata/taxonomy.js +58 -0
  25. package/build/api/marketing-and-promotions/marketing.d.ts +395 -0
  26. package/build/api/marketing-and-promotions/marketing.js +565 -0
  27. package/build/api/marketing-and-promotions/recommendation.d.ts +20 -0
  28. package/build/api/marketing-and-promotions/recommendation.js +32 -0
  29. package/build/api/order-management/dispute.d.ts +65 -0
  30. package/build/api/order-management/dispute.js +69 -0
  31. package/build/api/order-management/fulfillment.d.ts +80 -0
  32. package/build/api/order-management/fulfillment.js +89 -0
  33. package/build/api/other/compliance.d.ts +26 -0
  34. package/build/api/other/compliance.js +47 -0
  35. package/build/api/other/edelivery.d.ts +153 -0
  36. package/build/api/other/edelivery.js +219 -0
  37. package/build/api/other/identity.d.ts +17 -0
  38. package/build/api/other/identity.js +24 -0
  39. package/build/api/other/translation.d.ts +14 -0
  40. package/build/api/other/translation.js +22 -0
  41. package/build/api/other/vero.d.ts +30 -0
  42. package/build/api/other/vero.js +48 -0
  43. package/build/auth/oauth-metadata.d.ts +46 -0
  44. package/build/auth/oauth-metadata.js +59 -0
  45. package/build/auth/oauth-middleware.d.ts +35 -0
  46. package/build/auth/oauth-middleware.js +99 -0
  47. package/build/auth/oauth-types.d.ts +66 -0
  48. package/build/auth/oauth-types.js +4 -0
  49. package/build/auth/oauth.d.ts +93 -0
  50. package/build/auth/oauth.js +383 -0
  51. package/build/auth/scope-utils.d.ts +70 -0
  52. package/build/auth/scope-utils.js +304 -0
  53. package/build/auth/token-verifier.d.ts +57 -0
  54. package/build/auth/token-verifier.js +172 -0
  55. package/build/config/environment.d.ts +61 -0
  56. package/build/config/environment.js +260 -0
  57. package/build/index.d.ts +1 -0
  58. package/build/index.js +98 -0
  59. package/build/schemas/account-management/account.d.ts +5324 -0
  60. package/build/schemas/account-management/account.js +366 -0
  61. package/build/schemas/analytics/analytics.d.ts +167 -0
  62. package/build/schemas/analytics/analytics.js +191 -0
  63. package/build/schemas/communication/messages.d.ts +1872 -0
  64. package/build/schemas/communication/messages.js +348 -0
  65. package/build/schemas/fulfillment/orders.d.ts +4655 -0
  66. package/build/schemas/fulfillment/orders.js +317 -0
  67. package/build/schemas/index.d.ts +2100 -0
  68. package/build/schemas/index.js +68 -0
  69. package/build/schemas/inventory-management/inventory.d.ts +6419 -0
  70. package/build/schemas/inventory-management/inventory.js +450 -0
  71. package/build/schemas/marketing/marketing.d.ts +14181 -0
  72. package/build/schemas/marketing/marketing.js +1088 -0
  73. package/build/schemas/metadata/metadata.d.ts +5259 -0
  74. package/build/schemas/metadata/metadata.js +614 -0
  75. package/build/schemas/other/other-apis.d.ts +257 -0
  76. package/build/schemas/other/other-apis.js +372 -0
  77. package/build/schemas/taxonomy/taxonomy.d.ts +215 -0
  78. package/build/schemas/taxonomy/taxonomy.js +571 -0
  79. package/build/scripts/auto-setup.d.ts +12 -0
  80. package/build/scripts/auto-setup.js +277 -0
  81. package/build/scripts/diagnostics.d.ts +8 -0
  82. package/build/scripts/diagnostics.js +299 -0
  83. package/build/scripts/download-specs.d.ts +1 -0
  84. package/build/scripts/download-specs.js +116 -0
  85. package/build/scripts/interactive-setup.d.ts +21 -0
  86. package/build/scripts/interactive-setup.js +723 -0
  87. package/build/server-http.d.ts +11 -0
  88. package/build/server-http.js +361 -0
  89. package/build/tools/definitions/account-with-schemas.d.ts +39 -0
  90. package/build/tools/definitions/account-with-schemas.js +170 -0
  91. package/build/tools/definitions/account.d.ts +12 -0
  92. package/build/tools/definitions/account.js +428 -0
  93. package/build/tools/definitions/analytics.d.ts +25 -0
  94. package/build/tools/definitions/analytics.js +66 -0
  95. package/build/tools/definitions/communication.d.ts +12 -0
  96. package/build/tools/definitions/communication.js +151 -0
  97. package/build/tools/definitions/fulfillment.d.ts +12 -0
  98. package/build/tools/definitions/fulfillment.js +326 -0
  99. package/build/tools/definitions/index.d.ts +25 -0
  100. package/build/tools/definitions/index.js +37 -0
  101. package/build/tools/definitions/inventory.d.ts +12 -0
  102. package/build/tools/definitions/inventory.js +429 -0
  103. package/build/tools/definitions/marketing.d.ts +12 -0
  104. package/build/tools/definitions/marketing.js +1095 -0
  105. package/build/tools/definitions/metadata.d.ts +12 -0
  106. package/build/tools/definitions/metadata.js +188 -0
  107. package/build/tools/definitions/other.d.ts +13 -0
  108. package/build/tools/definitions/other.js +309 -0
  109. package/build/tools/definitions/taxonomy.d.ts +25 -0
  110. package/build/tools/definitions/taxonomy.js +64 -0
  111. package/build/tools/definitions/token-management.d.ts +35 -0
  112. package/build/tools/definitions/token-management.js +103 -0
  113. package/build/tools/index.d.ts +11 -0
  114. package/build/tools/index.js +1003 -0
  115. package/build/tools/schemas.d.ts +14764 -0
  116. package/build/tools/schemas.js +667 -0
  117. package/build/tools/tool-definitions.d.ts +35 -0
  118. package/build/tools/tool-definitions.js +3534 -0
  119. package/build/types/application-settings/developerAnalyticsV1BetaOas3.d.ts +197 -0
  120. package/build/types/application-settings/developerAnalyticsV1BetaOas3.js +5 -0
  121. package/build/types/application-settings/developerClientRegistrationV1Oas3.d.ts +155 -0
  122. package/build/types/application-settings/developerClientRegistrationV1Oas3.js +5 -0
  123. package/build/types/application-settings/developerKeyManagementV1Oas3.d.ts +246 -0
  124. package/build/types/application-settings/developerKeyManagementV1Oas3.js +5 -0
  125. package/build/types/ebay-enums.d.ts +1204 -0
  126. package/build/types/ebay-enums.js +1330 -0
  127. package/build/types/ebay.d.ts +143 -0
  128. package/build/types/ebay.js +123 -0
  129. package/build/types/index.d.ts +6 -0
  130. package/build/types/index.js +10 -0
  131. package/build/types/sell-apps/account-management/sellAccountV1Oas3.d.ts +2579 -0
  132. package/build/types/sell-apps/account-management/sellAccountV1Oas3.js +5 -0
  133. package/build/types/sell-apps/analytics-and-report/sellAnalyticsV1Oas3.d.ts +446 -0
  134. package/build/types/sell-apps/analytics-and-report/sellAnalyticsV1Oas3.js +5 -0
  135. package/build/types/sell-apps/communication/commerceFeedbackV1BetaOas3.d.ts +705 -0
  136. package/build/types/sell-apps/communication/commerceFeedbackV1BetaOas3.js +5 -0
  137. package/build/types/sell-apps/communication/commerceMessageV1Oas3.d.ts +590 -0
  138. package/build/types/sell-apps/communication/commerceMessageV1Oas3.js +5 -0
  139. package/build/types/sell-apps/communication/commerceNotificationV1Oas3.d.ts +1276 -0
  140. package/build/types/sell-apps/communication/commerceNotificationV1Oas3.js +5 -0
  141. package/build/types/sell-apps/communication/sellNegotiationV1Oas3.d.ts +277 -0
  142. package/build/types/sell-apps/communication/sellNegotiationV1Oas3.js +5 -0
  143. package/build/types/sell-apps/listing-management/sellInventoryV1Oas3.d.ts +3133 -0
  144. package/build/types/sell-apps/listing-management/sellInventoryV1Oas3.js +5 -0
  145. package/build/types/sell-apps/listing-metadata/sellMetadataV1Oas3.d.ts +2289 -0
  146. package/build/types/sell-apps/listing-metadata/sellMetadataV1Oas3.js +5 -0
  147. package/build/types/sell-apps/markeitng-and-promotions/sellMarketingV1Oas3.d.ts +6650 -0
  148. package/build/types/sell-apps/markeitng-and-promotions/sellMarketingV1Oas3.js +5 -0
  149. package/build/types/sell-apps/markeitng-and-promotions/sellRecommendationV1Oas3.d.ts +172 -0
  150. package/build/types/sell-apps/markeitng-and-promotions/sellRecommendationV1Oas3.js +5 -0
  151. package/build/types/sell-apps/order-management/sellFulfillmentV1Oas3.d.ts +1869 -0
  152. package/build/types/sell-apps/order-management/sellFulfillmentV1Oas3.js +5 -0
  153. package/build/types/sell-apps/other-apis/commerceIdentityV1Oas3.d.ts +178 -0
  154. package/build/types/sell-apps/other-apis/commerceIdentityV1Oas3.js +5 -0
  155. package/build/types/sell-apps/other-apis/commerceTranslationV1BetaOas3.d.ts +128 -0
  156. package/build/types/sell-apps/other-apis/commerceTranslationV1BetaOas3.js +5 -0
  157. package/build/types/sell-apps/other-apis/commerceVeroV1Oas3.d.ts +417 -0
  158. package/build/types/sell-apps/other-apis/commerceVeroV1Oas3.js +5 -0
  159. package/build/types/sell-apps/other-apis/sellComplianceV1Oas3.d.ts +273 -0
  160. package/build/types/sell-apps/other-apis/sellComplianceV1Oas3.js +5 -0
  161. package/build/types/sell-apps/other-apis/sellEdeliveryInternationalShippingOas3.d.ts +2537 -0
  162. package/build/types/sell-apps/other-apis/sellEdeliveryInternationalShippingOas3.js +5 -0
  163. package/build/types/sell-apps/other-apis/sellMarketingV1Oas3.d.ts +6650 -0
  164. package/build/types/sell-apps/other-apis/sellMarketingV1Oas3.js +5 -0
  165. package/build/types/sell-apps/other-apis/sellRecommendationV1Oas3.d.ts +172 -0
  166. package/build/types/sell-apps/other-apis/sellRecommendationV1Oas3.js +5 -0
  167. package/build/utils/account-management/account.d.ts +1094 -0
  168. package/build/utils/account-management/account.js +831 -0
  169. package/build/utils/communication/feedback.d.ts +152 -0
  170. package/build/utils/communication/feedback.js +216 -0
  171. package/build/utils/communication/message.d.ts +174 -0
  172. package/build/utils/communication/message.js +242 -0
  173. package/build/utils/communication/negotiation.d.ts +123 -0
  174. package/build/utils/communication/negotiation.js +150 -0
  175. package/build/utils/communication/notification.d.ts +370 -0
  176. package/build/utils/communication/notification.js +369 -0
  177. package/build/utils/date-converter.d.ts +59 -0
  178. package/build/utils/date-converter.js +160 -0
  179. package/build/utils/llm-client-detector.d.ts +54 -0
  180. package/build/utils/llm-client-detector.js +318 -0
  181. package/build/utils/oauth-helper.d.ts +37 -0
  182. package/build/utils/oauth-helper.js +315 -0
  183. package/build/utils/order-management/dispute.d.ts +346 -0
  184. package/build/utils/order-management/dispute.js +369 -0
  185. package/build/utils/order-management/fulfillment.d.ts +200 -0
  186. package/build/utils/order-management/fulfillment.js +205 -0
  187. package/build/utils/other/compliance.d.ts +49 -0
  188. package/build/utils/other/compliance.js +76 -0
  189. package/build/utils/other/edelivery.d.ts +310 -0
  190. package/build/utils/other/edelivery.js +241 -0
  191. package/build/utils/other/identity.d.ts +13 -0
  192. package/build/utils/other/identity.js +13 -0
  193. package/build/utils/other/translation.d.ts +28 -0
  194. package/build/utils/other/translation.js +41 -0
  195. package/build/utils/other/vero.d.ts +61 -0
  196. package/build/utils/other/vero.js +90 -0
  197. package/build/utils/scope-helper.d.ts +49 -0
  198. package/build/utils/scope-helper.js +207 -0
  199. package/build/utils/security-checker.d.ts +46 -0
  200. package/build/utils/security-checker.js +248 -0
  201. package/build/utils/setup-validator.d.ts +25 -0
  202. package/build/utils/setup-validator.js +305 -0
  203. package/build/utils/token-utils.d.ts +40 -0
  204. package/build/utils/token-utils.js +40 -0
  205. package/package.json +115 -0
@@ -0,0 +1,1095 @@
1
+ import { z } from 'zod';
2
+ import { zodToJsonSchema } from 'zod-to-json-schema';
3
+ import { MarketplaceId } from '../../types/ebay-enums.js';
4
+ import { campaignPagedCollectionResponseSchema, campaignSchema, adGroupPagedCollectionResponseSchema, adPagedCollectionResponseSchema, createAdsByInventoryReferenceResponseSchema, bulkCreateAdsByInventoryReferenceResponseSchema, bulkAdResponseSchema, adResponseSchema, baseResponseSchema, } from '../../schemas/marketing/marketing.js';
5
+ // Reusable schemas
6
+ const campaignIdSchema = z.string().describe('Campaign ID');
7
+ const adIdSchema = z.string().describe('Ad ID');
8
+ const adGroupIdSchema = z.string().describe('Ad Group ID');
9
+ const keywordIdSchema = z.string().describe('Keyword ID');
10
+ const negativeKeywordIdSchema = z.string().describe('Negative Keyword ID');
11
+ const promotionIdSchema = z.string().describe('Promotion ID');
12
+ const reportIdSchema = z.string().describe('Report ID');
13
+ const reportTaskIdSchema = z.string().describe('Report Task ID');
14
+ // Generic success response for operations without specific output schemas
15
+ const genericSuccessSchema = zodToJsonSchema(baseResponseSchema, {
16
+ name: 'GenericSuccessResponse',
17
+ $refStrategy: 'none',
18
+ });
19
+ const limitSchema = z.number().optional().describe('Maximum number of results to return');
20
+ const offsetSchema = z.number().optional().describe('Number of results to skip');
21
+ export const marketingTools = [
22
+ // ========================================
23
+ // CAMPAIGN MANAGEMENT (11 tools)
24
+ // ========================================
25
+ {
26
+ name: 'ebay_get_campaigns',
27
+ description: 'Get all marketing campaigns for the seller. Returns campaigns with status, budget, and performance data.',
28
+ inputSchema: {
29
+ campaignStatus: z
30
+ .string()
31
+ .optional()
32
+ .describe('Filter by campaign status: RUNNING, PAUSED, ENDED, or ARCHIVED'),
33
+ marketplaceId: z.nativeEnum(MarketplaceId).optional().describe('Filter by marketplace ID'),
34
+ limit: limitSchema,
35
+ offset: offsetSchema,
36
+ },
37
+ outputSchema: zodToJsonSchema(campaignPagedCollectionResponseSchema, {
38
+ name: 'CampaignPagedCollectionResponseResponse',
39
+ $refStrategy: 'none',
40
+ }),
41
+ },
42
+ {
43
+ name: 'ebay_get_campaign',
44
+ description: 'Get details of a specific marketing campaign by ID. Returns campaign configuration, status, and statistics.',
45
+ inputSchema: {
46
+ campaignId: campaignIdSchema,
47
+ },
48
+ outputSchema: zodToJsonSchema(campaignSchema, {
49
+ name: 'CampaignResponse',
50
+ $refStrategy: 'none',
51
+ }),
52
+ },
53
+ {
54
+ name: 'ebay_get_campaign_by_name',
55
+ description: 'Find a campaign by its name. Returns campaign details if a matching name is found.',
56
+ inputSchema: {
57
+ campaignName: z.string().describe('Campaign name to search for'),
58
+ },
59
+ outputSchema: zodToJsonSchema(campaignSchema, {
60
+ name: 'CampaignResponse',
61
+ $refStrategy: 'none',
62
+ }),
63
+ },
64
+ {
65
+ name: 'ebay_create_campaign',
66
+ description: 'Create a new marketing campaign. Supports both CPS (Cost Per Sale) and CPC (Cost Per Click) campaigns.',
67
+ inputSchema: {
68
+ campaign: z
69
+ .object({
70
+ campaignName: z.string().describe('Campaign name'),
71
+ marketplaceId: z.nativeEnum(MarketplaceId).describe('Marketplace ID'),
72
+ fundingStrategy: z
73
+ .object({
74
+ fundingModel: z
75
+ .enum(['COST_PER_SALE', 'COST_PER_CLICK'])
76
+ .describe('Funding model: CPS or CPC'),
77
+ bidPercentage: z
78
+ .string()
79
+ .optional()
80
+ .describe('Bid percentage for CPS campaigns (e.g., "10.5")'),
81
+ })
82
+ .describe('Funding strategy configuration'),
83
+ startDate: z.string().optional().describe('Campaign start date (ISO 8601 format)'),
84
+ endDate: z.string().optional().describe('Campaign end date (ISO 8601 format)'),
85
+ })
86
+ .describe('Campaign configuration'),
87
+ },
88
+ outputSchema: zodToJsonSchema(campaignSchema, {
89
+ name: 'CampaignResponse',
90
+ $refStrategy: 'none',
91
+ }),
92
+ },
93
+ {
94
+ name: 'ebay_clone_campaign',
95
+ description: 'Clone an existing campaign with new settings. Useful for creating campaigns with modified budget or duration.',
96
+ inputSchema: {
97
+ campaignId: campaignIdSchema,
98
+ cloneData: z
99
+ .object({
100
+ campaignName: z.string().optional().describe('Name for the cloned campaign'),
101
+ fundingStrategy: z
102
+ .object({
103
+ fundingModel: z.enum(['COST_PER_SALE', 'COST_PER_CLICK']).optional(),
104
+ bidPercentage: z.string().optional().describe('Bid percentage (e.g., "10.5")'),
105
+ })
106
+ .optional(),
107
+ startDate: z.string().optional().describe('Start date (ISO 8601 format)'),
108
+ endDate: z.string().optional().describe('End date (ISO 8601 format)'),
109
+ })
110
+ .describe('New campaign settings'),
111
+ },
112
+ outputSchema: zodToJsonSchema(campaignSchema, {
113
+ name: 'CampaignResponse',
114
+ $refStrategy: 'none',
115
+ }),
116
+ },
117
+ {
118
+ name: 'ebay_pause_campaign',
119
+ description: 'Pause a running marketing campaign. Campaign can be resumed later.',
120
+ inputSchema: {
121
+ campaignId: campaignIdSchema,
122
+ },
123
+ outputSchema: genericSuccessSchema,
124
+ },
125
+ {
126
+ name: 'ebay_resume_campaign',
127
+ description: 'Resume a paused marketing campaign. Campaign will start running again.',
128
+ inputSchema: {
129
+ campaignId: campaignIdSchema,
130
+ },
131
+ outputSchema: genericSuccessSchema,
132
+ },
133
+ {
134
+ name: 'ebay_end_campaign',
135
+ description: 'Permanently end a marketing campaign. Cannot be restarted after ending.',
136
+ inputSchema: {
137
+ campaignId: campaignIdSchema,
138
+ },
139
+ outputSchema: genericSuccessSchema,
140
+ },
141
+ {
142
+ name: 'ebay_update_campaign_identification',
143
+ description: 'Update campaign name or other identification details.',
144
+ inputSchema: {
145
+ campaignId: campaignIdSchema,
146
+ updateData: z
147
+ .object({
148
+ campaignName: z.string().optional().describe('New campaign name'),
149
+ })
150
+ .describe('Campaign identification data to update'),
151
+ },
152
+ outputSchema: genericSuccessSchema,
153
+ },
154
+ // ========================================
155
+ // AD OPERATIONS - BULK (8 tools)
156
+ // ========================================
157
+ {
158
+ name: 'ebay_bulk_create_ads_by_inventory_reference',
159
+ description: 'Create multiple ads using Inventory API references (SKU/inventory item group key). CPS campaigns only.',
160
+ inputSchema: {
161
+ campaignId: campaignIdSchema,
162
+ ads: z
163
+ .object({
164
+ inventoryReferences: z
165
+ .array(z.object({
166
+ inventoryReferenceId: z.string().describe('SKU or inventory item group key'),
167
+ inventoryReferenceType: z
168
+ .enum(['INVENTORY_ITEM', 'INVENTORY_ITEM_GROUP'])
169
+ .describe('Reference type'),
170
+ }))
171
+ .describe('Array of inventory references'),
172
+ bidPercentage: z
173
+ .string()
174
+ .optional()
175
+ .describe('Bid percentage for all ads (e.g., "10.5")'),
176
+ })
177
+ .describe('Bulk ad creation request'),
178
+ },
179
+ outputSchema: zodToJsonSchema(bulkCreateAdsByInventoryReferenceResponseSchema, {
180
+ name: 'BulkCreateAdsByInventoryReferenceResponseResponse',
181
+ $refStrategy: 'none',
182
+ }),
183
+ },
184
+ {
185
+ name: 'ebay_bulk_create_ads_by_listing_id',
186
+ description: 'Create multiple ads using listing IDs. Maximum 500 listings per call. Supports both CPS and CPC campaigns.',
187
+ inputSchema: {
188
+ campaignId: campaignIdSchema,
189
+ ads: z
190
+ .object({
191
+ requests: z
192
+ .array(z.object({
193
+ listingId: z.string().describe('eBay listing ID'),
194
+ bidPercentage: z.string().optional().describe('Bid percentage (e.g., "10.5")'),
195
+ }))
196
+ .max(500)
197
+ .describe('Array of ad requests (max 500)'),
198
+ })
199
+ .describe('Bulk ad creation request'),
200
+ },
201
+ outputSchema: zodToJsonSchema(bulkAdResponseSchema, {
202
+ name: 'BulkAdResponseResponse',
203
+ $refStrategy: 'none',
204
+ }),
205
+ },
206
+ {
207
+ name: 'ebay_bulk_delete_ads_by_inventory_reference',
208
+ description: 'Delete multiple ads by inventory reference. CPS campaigns only.',
209
+ inputSchema: {
210
+ campaignId: campaignIdSchema,
211
+ ads: z
212
+ .object({
213
+ inventoryReferences: z
214
+ .array(z.object({
215
+ inventoryReferenceId: z.string().describe('SKU or inventory item group key'),
216
+ inventoryReferenceType: z
217
+ .enum(['INVENTORY_ITEM', 'INVENTORY_ITEM_GROUP'])
218
+ .describe('Reference type'),
219
+ }))
220
+ .describe('Array of inventory references to delete'),
221
+ })
222
+ .describe('Bulk ad deletion request'),
223
+ },
224
+ outputSchema: zodToJsonSchema(bulkAdResponseSchema, {
225
+ name: 'BulkAdResponseResponse',
226
+ $refStrategy: 'none',
227
+ }),
228
+ },
229
+ {
230
+ name: 'ebay_bulk_delete_ads_by_listing_id',
231
+ description: 'Delete multiple ads by listing ID. CPS campaigns only.',
232
+ inputSchema: {
233
+ campaignId: campaignIdSchema,
234
+ ads: z
235
+ .object({
236
+ listingIds: z.array(z.string()).describe('Array of listing IDs to delete'),
237
+ })
238
+ .describe('Bulk ad deletion request'),
239
+ },
240
+ outputSchema: zodToJsonSchema(bulkAdResponseSchema, {
241
+ name: 'BulkAdResponseResponse',
242
+ $refStrategy: 'none',
243
+ }),
244
+ },
245
+ {
246
+ name: 'ebay_bulk_update_ads_bid_by_inventory_reference',
247
+ description: 'Update bid percentages for multiple ads by inventory reference. CPS campaigns only.',
248
+ inputSchema: {
249
+ campaignId: campaignIdSchema,
250
+ ads: z
251
+ .object({
252
+ requests: z
253
+ .array(z.object({
254
+ inventoryReferenceId: z.string().describe('SKU or inventory item group key'),
255
+ inventoryReferenceType: z
256
+ .enum(['INVENTORY_ITEM', 'INVENTORY_ITEM_GROUP'])
257
+ .describe('Reference type'),
258
+ bidPercentage: z.string().describe('New bid percentage (e.g., "10.5")'),
259
+ }))
260
+ .describe('Array of bid update requests'),
261
+ })
262
+ .describe('Bulk bid update request'),
263
+ },
264
+ outputSchema: zodToJsonSchema(bulkAdResponseSchema, {
265
+ name: 'BulkAdResponseResponse',
266
+ $refStrategy: 'none',
267
+ }),
268
+ },
269
+ {
270
+ name: 'ebay_bulk_update_ads_bid_by_listing_id',
271
+ description: 'Update bid percentages for multiple ads by listing ID. CPS campaigns only.',
272
+ inputSchema: {
273
+ campaignId: campaignIdSchema,
274
+ ads: z
275
+ .object({
276
+ requests: z
277
+ .array(z.object({
278
+ listingId: z.string().describe('eBay listing ID'),
279
+ bidPercentage: z.string().describe('New bid percentage (e.g., "10.5")'),
280
+ }))
281
+ .describe('Array of bid update requests'),
282
+ })
283
+ .describe('Bulk bid update request'),
284
+ },
285
+ outputSchema: zodToJsonSchema(bulkAdResponseSchema, {
286
+ name: 'BulkAdResponseResponse',
287
+ $refStrategy: 'none',
288
+ }),
289
+ },
290
+ {
291
+ name: 'ebay_bulk_update_ads_status',
292
+ description: 'Update status for multiple ads. CPC priority strategy campaigns only.',
293
+ inputSchema: {
294
+ campaignId: campaignIdSchema,
295
+ ads: z
296
+ .object({
297
+ requests: z
298
+ .array(z.object({
299
+ adId: z.string().describe('Ad ID'),
300
+ adStatus: z.enum(['ACTIVE', 'PAUSED', 'ARCHIVED']).describe('New ad status'),
301
+ }))
302
+ .describe('Array of status update requests'),
303
+ })
304
+ .describe('Bulk status update request'),
305
+ },
306
+ outputSchema: zodToJsonSchema(bulkAdResponseSchema, {
307
+ name: 'BulkAdResponseResponse',
308
+ $refStrategy: 'none',
309
+ }),
310
+ },
311
+ {
312
+ name: 'ebay_bulk_update_ads_status_by_listing_id',
313
+ description: 'Update status for multiple ads by listing ID. CPC priority strategy campaigns only.',
314
+ inputSchema: {
315
+ campaignId: campaignIdSchema,
316
+ ads: z
317
+ .object({
318
+ requests: z
319
+ .array(z.object({
320
+ listingId: z.string().describe('eBay listing ID'),
321
+ adStatus: z.enum(['ACTIVE', 'PAUSED', 'ARCHIVED']).describe('New ad status'),
322
+ }))
323
+ .describe('Array of status update requests'),
324
+ })
325
+ .describe('Bulk status update request'),
326
+ },
327
+ outputSchema: zodToJsonSchema(bulkAdResponseSchema, {
328
+ name: 'BulkAdResponseResponse',
329
+ $refStrategy: 'none',
330
+ }),
331
+ },
332
+ // ========================================
333
+ // AD OPERATIONS - SINGLE (9 tools)
334
+ // ========================================
335
+ {
336
+ name: 'ebay_create_ad',
337
+ description: 'Create a single ad in a campaign. Supports both CPS and CPC campaigns.',
338
+ inputSchema: {
339
+ campaignId: campaignIdSchema,
340
+ ad: z
341
+ .object({
342
+ listingId: z.string().describe('eBay listing ID'),
343
+ bidPercentage: z.string().optional().describe('Bid percentage (e.g., "10.5")'),
344
+ adGroupId: z
345
+ .string()
346
+ .optional()
347
+ .describe('Ad group ID (required for manual targeting CPC campaigns)'),
348
+ })
349
+ .describe('Ad configuration'),
350
+ },
351
+ outputSchema: zodToJsonSchema(adResponseSchema, {
352
+ name: 'AdResponseResponse',
353
+ $refStrategy: 'none',
354
+ }),
355
+ },
356
+ {
357
+ name: 'ebay_create_ads_by_inventory_reference',
358
+ description: 'Create ads using Inventory API references. CPS campaigns only.',
359
+ inputSchema: {
360
+ campaignId: campaignIdSchema,
361
+ ads: z
362
+ .object({
363
+ inventoryReferences: z
364
+ .array(z.object({
365
+ inventoryReferenceId: z.string().describe('SKU or inventory item group key'),
366
+ inventoryReferenceType: z
367
+ .enum(['INVENTORY_ITEM', 'INVENTORY_ITEM_GROUP'])
368
+ .describe('Reference type'),
369
+ }))
370
+ .describe('Array of inventory references'),
371
+ bidPercentage: z.string().optional().describe('Bid percentage for all ads'),
372
+ })
373
+ .describe('Ad creation request'),
374
+ },
375
+ outputSchema: zodToJsonSchema(createAdsByInventoryReferenceResponseSchema, {
376
+ name: 'CreateAdsByInventoryReferenceResponseResponse',
377
+ $refStrategy: 'none',
378
+ }),
379
+ },
380
+ {
381
+ name: 'ebay_get_ad',
382
+ description: 'Get details of a specific ad in a campaign.',
383
+ inputSchema: {
384
+ campaignId: campaignIdSchema,
385
+ adId: adIdSchema,
386
+ },
387
+ outputSchema: zodToJsonSchema(adResponseSchema, {
388
+ name: 'AdResponseResponse',
389
+ $refStrategy: 'none',
390
+ }),
391
+ },
392
+ {
393
+ name: 'ebay_get_ads',
394
+ description: 'Get all ads for a campaign with optional filters.',
395
+ inputSchema: {
396
+ campaignId: campaignIdSchema,
397
+ adGroupIds: z.string().optional().describe('Comma-separated ad group IDs to filter by'),
398
+ adStatus: z.string().optional().describe('Filter by ad status: ACTIVE, PAUSED, or ARCHIVED'),
399
+ limit: limitSchema,
400
+ listingIds: z.string().optional().describe('Comma-separated listing IDs to filter by'),
401
+ offset: offsetSchema,
402
+ },
403
+ outputSchema: zodToJsonSchema(adPagedCollectionResponseSchema, {
404
+ name: 'AdPagedCollectionResponseResponse',
405
+ $refStrategy: 'none',
406
+ }),
407
+ },
408
+ {
409
+ name: 'ebay_get_ads_by_inventory_reference',
410
+ description: 'Get ads by inventory reference (SKU or inventory item group key). CPS campaigns only.',
411
+ inputSchema: {
412
+ campaignId: campaignIdSchema,
413
+ inventoryReferenceId: z.string().describe('SKU or inventory item group key'),
414
+ inventoryReferenceType: z
415
+ .enum(['INVENTORY_ITEM', 'INVENTORY_ITEM_GROUP'])
416
+ .describe('Reference type'),
417
+ },
418
+ outputSchema: zodToJsonSchema(adPagedCollectionResponseSchema, {
419
+ name: 'AdPagedCollectionResponseResponse',
420
+ $refStrategy: 'none',
421
+ }),
422
+ },
423
+ {
424
+ name: 'ebay_get_ads_by_listing_id',
425
+ description: 'Get ads by listing ID. Returns all ads for the specified listing.',
426
+ inputSchema: {
427
+ campaignId: campaignIdSchema,
428
+ listingId: z.string().describe('eBay listing ID'),
429
+ },
430
+ },
431
+ {
432
+ name: 'ebay_delete_ad',
433
+ description: 'Delete a specific ad from a campaign.',
434
+ inputSchema: {
435
+ campaignId: campaignIdSchema,
436
+ adId: adIdSchema,
437
+ },
438
+ outputSchema: genericSuccessSchema,
439
+ },
440
+ {
441
+ name: 'ebay_clone_ad',
442
+ description: 'Clone an ad within a campaign.',
443
+ inputSchema: {
444
+ campaignId: campaignIdSchema,
445
+ adId: adIdSchema,
446
+ },
447
+ },
448
+ {
449
+ name: 'ebay_update_ad_bid',
450
+ description: 'Update the bid percentage for a specific ad.',
451
+ inputSchema: {
452
+ campaignId: campaignIdSchema,
453
+ adId: adIdSchema,
454
+ bidPercentage: z.string().describe('New bid percentage (e.g., "10.5")'),
455
+ },
456
+ outputSchema: zodToJsonSchema(adResponseSchema, {
457
+ name: 'AdResponseResponse',
458
+ $refStrategy: 'none',
459
+ }),
460
+ },
461
+ // ========================================
462
+ // AD GROUP MANAGEMENT (6 tools)
463
+ // ========================================
464
+ {
465
+ name: 'ebay_create_ad_group',
466
+ description: 'Create an ad group for manual targeting in a CPC campaign. Required for CPC campaigns with manual targeting.',
467
+ inputSchema: {
468
+ campaignId: campaignIdSchema,
469
+ adGroup: z
470
+ .object({
471
+ name: z.string().describe('Ad group name'),
472
+ defaultBid: z
473
+ .object({
474
+ amount: z.string().describe('Default bid amount'),
475
+ currency: z.string().describe('Currency code (e.g., USD)'),
476
+ })
477
+ .optional()
478
+ .describe('Default bid for keywords in this ad group'),
479
+ })
480
+ .describe('Ad group configuration'),
481
+ },
482
+ outputSchema: genericSuccessSchema,
483
+ },
484
+ {
485
+ name: 'ebay_get_ad_group',
486
+ description: 'Get details of a specific ad group.',
487
+ inputSchema: {
488
+ campaignId: campaignIdSchema,
489
+ adGroupId: adGroupIdSchema,
490
+ },
491
+ outputSchema: genericSuccessSchema,
492
+ },
493
+ {
494
+ name: 'ebay_get_ad_groups',
495
+ description: 'Get all ad groups for a campaign.',
496
+ inputSchema: {
497
+ campaignId: campaignIdSchema,
498
+ limit: limitSchema,
499
+ offset: offsetSchema,
500
+ },
501
+ outputSchema: zodToJsonSchema(adGroupPagedCollectionResponseSchema, {
502
+ name: 'AdGroupPagedCollectionResponseResponse',
503
+ $refStrategy: 'none',
504
+ }),
505
+ },
506
+ {
507
+ name: 'ebay_clone_ad_group',
508
+ description: 'Clone an ad group within a campaign.',
509
+ inputSchema: {
510
+ campaignId: campaignIdSchema,
511
+ adGroupId: adGroupIdSchema,
512
+ },
513
+ },
514
+ {
515
+ name: 'ebay_update_ad_group_bids',
516
+ description: 'Update default bids for an ad group.',
517
+ inputSchema: {
518
+ campaignId: campaignIdSchema,
519
+ adGroupId: adGroupIdSchema,
520
+ updateData: z
521
+ .object({
522
+ defaultBid: z
523
+ .object({
524
+ amount: z.string().describe('New default bid amount'),
525
+ currency: z.string().describe('Currency code'),
526
+ })
527
+ .describe('New default bid'),
528
+ })
529
+ .describe('Bid update data'),
530
+ },
531
+ },
532
+ {
533
+ name: 'ebay_update_ad_group_keywords',
534
+ description: 'Update keywords for an ad group.',
535
+ inputSchema: {
536
+ campaignId: campaignIdSchema,
537
+ adGroupId: adGroupIdSchema,
538
+ updateData: z.record(z.unknown()).describe('Keyword update data'),
539
+ },
540
+ },
541
+ // ========================================
542
+ // KEYWORD MANAGEMENT (8 tools)
543
+ // ========================================
544
+ {
545
+ name: 'ebay_create_keyword',
546
+ description: 'Create a keyword for manual targeting in a CPC campaign ad group.',
547
+ inputSchema: {
548
+ campaignId: campaignIdSchema,
549
+ keyword: z
550
+ .object({
551
+ keywordText: z.string().describe('Keyword text'),
552
+ matchType: z.enum(['BROAD', 'PHRASE', 'EXACT']).describe('Keyword match type'),
553
+ bid: z
554
+ .object({
555
+ amount: z.string().describe('Bid amount'),
556
+ currency: z.string().describe('Currency code'),
557
+ })
558
+ .optional()
559
+ .describe('Keyword-specific bid (overrides ad group default)'),
560
+ })
561
+ .describe('Keyword configuration'),
562
+ },
563
+ },
564
+ {
565
+ name: 'ebay_get_keyword',
566
+ description: 'Get details of a specific keyword.',
567
+ inputSchema: {
568
+ campaignId: campaignIdSchema,
569
+ keywordId: keywordIdSchema,
570
+ },
571
+ },
572
+ {
573
+ name: 'ebay_get_keywords',
574
+ description: 'Get all keywords for a campaign.',
575
+ inputSchema: {
576
+ campaignId: campaignIdSchema,
577
+ adGroupIds: z.string().optional().describe('Comma-separated ad group IDs to filter by'),
578
+ limit: limitSchema,
579
+ offset: offsetSchema,
580
+ },
581
+ },
582
+ {
583
+ name: 'ebay_delete_keyword',
584
+ description: 'Delete a specific keyword from a campaign.',
585
+ inputSchema: {
586
+ campaignId: campaignIdSchema,
587
+ keywordId: keywordIdSchema,
588
+ },
589
+ },
590
+ {
591
+ name: 'ebay_update_keyword_bid',
592
+ description: 'Update the bid for a specific keyword.',
593
+ inputSchema: {
594
+ campaignId: campaignIdSchema,
595
+ keywordId: keywordIdSchema,
596
+ bid: z
597
+ .object({
598
+ amount: z.string().describe('New bid amount'),
599
+ currency: z.string().describe('Currency code'),
600
+ })
601
+ .describe('New bid'),
602
+ },
603
+ },
604
+ {
605
+ name: 'ebay_bulk_create_keywords',
606
+ description: 'Create multiple keywords in a campaign. Maximum recommended per call varies by eBay.',
607
+ inputSchema: {
608
+ campaignId: campaignIdSchema,
609
+ keywords: z
610
+ .object({
611
+ requests: z
612
+ .array(z.object({
613
+ keywordText: z.string().describe('Keyword text'),
614
+ matchType: z.enum(['BROAD', 'PHRASE', 'EXACT']).describe('Match type'),
615
+ adGroupId: z.string().optional().describe('Ad group ID'),
616
+ bid: z
617
+ .object({
618
+ amount: z.string(),
619
+ currency: z.string(),
620
+ })
621
+ .optional(),
622
+ }))
623
+ .describe('Array of keyword creation requests'),
624
+ })
625
+ .describe('Bulk keyword creation request'),
626
+ },
627
+ },
628
+ {
629
+ name: 'ebay_bulk_delete_keywords',
630
+ description: 'Delete multiple keywords from a campaign.',
631
+ inputSchema: {
632
+ campaignId: campaignIdSchema,
633
+ keywords: z
634
+ .object({
635
+ keywordIds: z.array(z.string()).describe('Array of keyword IDs to delete'),
636
+ })
637
+ .describe('Bulk keyword deletion request'),
638
+ },
639
+ },
640
+ {
641
+ name: 'ebay_bulk_update_keyword_bids',
642
+ description: 'Update bids for multiple keywords.',
643
+ inputSchema: {
644
+ campaignId: campaignIdSchema,
645
+ keywords: z
646
+ .object({
647
+ requests: z
648
+ .array(z.object({
649
+ keywordId: z.string().describe('Keyword ID'),
650
+ bid: z
651
+ .object({
652
+ amount: z.string().describe('New bid amount'),
653
+ currency: z.string().describe('Currency code'),
654
+ })
655
+ .describe('New bid'),
656
+ }))
657
+ .describe('Array of bid update requests'),
658
+ })
659
+ .describe('Bulk keyword bid update request'),
660
+ },
661
+ },
662
+ // ========================================
663
+ // NEGATIVE KEYWORDS - CAMPAIGN LEVEL (8 tools)
664
+ // ========================================
665
+ {
666
+ name: 'ebay_create_campaign_negative_keyword',
667
+ description: 'Create a campaign-level negative keyword. Prevents ads from showing for this keyword across entire campaign.',
668
+ inputSchema: {
669
+ negativeKeyword: z
670
+ .object({
671
+ keywordText: z.string().describe('Negative keyword text'),
672
+ matchType: z.enum(['BROAD', 'PHRASE', 'EXACT']).describe('Match type'),
673
+ })
674
+ .describe('Negative keyword configuration'),
675
+ },
676
+ },
677
+ {
678
+ name: 'ebay_get_campaign_negative_keyword',
679
+ description: 'Get details of a specific campaign-level negative keyword.',
680
+ inputSchema: {
681
+ negativeKeywordId: negativeKeywordIdSchema,
682
+ },
683
+ },
684
+ {
685
+ name: 'ebay_get_campaign_negative_keywords',
686
+ description: 'Get all campaign-level negative keywords.',
687
+ inputSchema: {
688
+ campaignIds: z.string().optional().describe('Comma-separated campaign IDs to filter by'),
689
+ limit: limitSchema,
690
+ offset: offsetSchema,
691
+ },
692
+ },
693
+ {
694
+ name: 'ebay_delete_campaign_negative_keyword',
695
+ description: 'Delete a campaign-level negative keyword.',
696
+ inputSchema: {
697
+ negativeKeywordId: negativeKeywordIdSchema,
698
+ },
699
+ },
700
+ {
701
+ name: 'ebay_update_campaign_negative_keyword',
702
+ description: 'Update a campaign-level negative keyword.',
703
+ inputSchema: {
704
+ negativeKeywordId: negativeKeywordIdSchema,
705
+ updateData: z
706
+ .object({
707
+ keywordText: z.string().optional().describe('New keyword text'),
708
+ matchType: z.enum(['BROAD', 'PHRASE', 'EXACT']).optional().describe('New match type'),
709
+ })
710
+ .describe('Negative keyword update data'),
711
+ },
712
+ },
713
+ {
714
+ name: 'ebay_bulk_create_campaign_negative_keywords',
715
+ description: 'Create multiple campaign-level negative keywords.',
716
+ inputSchema: {
717
+ negativeKeywords: z
718
+ .object({
719
+ requests: z
720
+ .array(z.object({
721
+ campaignId: z.string().describe('Campaign ID'),
722
+ keywordText: z.string().describe('Negative keyword text'),
723
+ matchType: z.enum(['BROAD', 'PHRASE', 'EXACT']).describe('Match type'),
724
+ }))
725
+ .describe('Array of negative keyword creation requests'),
726
+ })
727
+ .describe('Bulk negative keyword creation request'),
728
+ },
729
+ },
730
+ {
731
+ name: 'ebay_bulk_update_campaign_negative_keywords',
732
+ description: 'Update multiple campaign-level negative keywords.',
733
+ inputSchema: {
734
+ negativeKeywords: z
735
+ .object({
736
+ requests: z
737
+ .array(z.object({
738
+ negativeKeywordId: z.string().describe('Negative keyword ID'),
739
+ keywordText: z.string().optional().describe('New keyword text'),
740
+ matchType: z
741
+ .enum(['BROAD', 'PHRASE', 'EXACT'])
742
+ .optional()
743
+ .describe('New match type'),
744
+ }))
745
+ .describe('Array of update requests'),
746
+ })
747
+ .describe('Bulk negative keyword update request'),
748
+ },
749
+ },
750
+ {
751
+ name: 'ebay_bulk_delete_campaign_negative_keywords',
752
+ description: 'Delete multiple campaign-level negative keywords.',
753
+ inputSchema: {
754
+ negativeKeywords: z
755
+ .object({
756
+ negativeKeywordIds: z
757
+ .array(z.string())
758
+ .describe('Array of negative keyword IDs to delete'),
759
+ })
760
+ .describe('Bulk negative keyword deletion request'),
761
+ },
762
+ },
763
+ // ========================================
764
+ // NEGATIVE KEYWORDS - AD GROUP LEVEL (8 tools)
765
+ // ========================================
766
+ {
767
+ name: 'ebay_create_ad_group_negative_keyword',
768
+ description: 'Create an ad group-level negative keyword. Prevents ads in this ad group from showing for this keyword.',
769
+ inputSchema: {
770
+ campaignId: campaignIdSchema,
771
+ adGroupId: adGroupIdSchema,
772
+ negativeKeyword: z
773
+ .object({
774
+ keywordText: z.string().describe('Negative keyword text'),
775
+ matchType: z.enum(['BROAD', 'PHRASE', 'EXACT']).describe('Match type'),
776
+ })
777
+ .describe('Negative keyword configuration'),
778
+ },
779
+ },
780
+ {
781
+ name: 'ebay_get_ad_group_negative_keyword',
782
+ description: 'Get details of a specific ad group-level negative keyword.',
783
+ inputSchema: {
784
+ campaignId: campaignIdSchema,
785
+ adGroupId: adGroupIdSchema,
786
+ negativeKeywordId: negativeKeywordIdSchema,
787
+ },
788
+ },
789
+ {
790
+ name: 'ebay_get_ad_group_negative_keywords',
791
+ description: 'Get all negative keywords for an ad group.',
792
+ inputSchema: {
793
+ campaignId: campaignIdSchema,
794
+ adGroupId: adGroupIdSchema,
795
+ limit: limitSchema,
796
+ offset: offsetSchema,
797
+ },
798
+ },
799
+ {
800
+ name: 'ebay_delete_ad_group_negative_keyword',
801
+ description: 'Delete an ad group-level negative keyword.',
802
+ inputSchema: {
803
+ campaignId: campaignIdSchema,
804
+ adGroupId: adGroupIdSchema,
805
+ negativeKeywordId: negativeKeywordIdSchema,
806
+ },
807
+ },
808
+ {
809
+ name: 'ebay_update_ad_group_negative_keyword',
810
+ description: 'Update an ad group-level negative keyword.',
811
+ inputSchema: {
812
+ campaignId: campaignIdSchema,
813
+ adGroupId: adGroupIdSchema,
814
+ negativeKeywordId: negativeKeywordIdSchema,
815
+ updateData: z
816
+ .object({
817
+ keywordText: z.string().optional().describe('New keyword text'),
818
+ matchType: z.enum(['BROAD', 'PHRASE', 'EXACT']).optional().describe('New match type'),
819
+ })
820
+ .describe('Negative keyword update data'),
821
+ },
822
+ },
823
+ {
824
+ name: 'ebay_bulk_create_ad_group_negative_keywords',
825
+ description: 'Create multiple ad group-level negative keywords.',
826
+ inputSchema: {
827
+ campaignId: campaignIdSchema,
828
+ adGroupId: adGroupIdSchema,
829
+ negativeKeywords: z
830
+ .object({
831
+ requests: z
832
+ .array(z.object({
833
+ keywordText: z.string().describe('Negative keyword text'),
834
+ matchType: z.enum(['BROAD', 'PHRASE', 'EXACT']).describe('Match type'),
835
+ }))
836
+ .describe('Array of negative keyword creation requests'),
837
+ })
838
+ .describe('Bulk negative keyword creation request'),
839
+ },
840
+ },
841
+ {
842
+ name: 'ebay_bulk_update_ad_group_negative_keywords',
843
+ description: 'Update multiple ad group-level negative keywords.',
844
+ inputSchema: {
845
+ campaignId: campaignIdSchema,
846
+ adGroupId: adGroupIdSchema,
847
+ negativeKeywords: z
848
+ .object({
849
+ requests: z
850
+ .array(z.object({
851
+ negativeKeywordId: z.string().describe('Negative keyword ID'),
852
+ keywordText: z.string().optional().describe('New keyword text'),
853
+ matchType: z
854
+ .enum(['BROAD', 'PHRASE', 'EXACT'])
855
+ .optional()
856
+ .describe('New match type'),
857
+ }))
858
+ .describe('Array of update requests'),
859
+ })
860
+ .describe('Bulk negative keyword update request'),
861
+ },
862
+ },
863
+ {
864
+ name: 'ebay_bulk_delete_ad_group_negative_keywords',
865
+ description: 'Delete multiple ad group-level negative keywords.',
866
+ inputSchema: {
867
+ campaignId: campaignIdSchema,
868
+ adGroupId: adGroupIdSchema,
869
+ negativeKeywords: z
870
+ .object({
871
+ negativeKeywordIds: z
872
+ .array(z.string())
873
+ .describe('Array of negative keyword IDs to delete'),
874
+ })
875
+ .describe('Bulk negative keyword deletion request'),
876
+ },
877
+ },
878
+ // ========================================
879
+ // TARGETING (3 tools)
880
+ // ========================================
881
+ {
882
+ name: 'ebay_create_targeting',
883
+ description: 'Create targeting configuration for a campaign.',
884
+ inputSchema: {
885
+ campaignId: campaignIdSchema,
886
+ targeting: z.record(z.unknown()).describe('Targeting configuration'),
887
+ },
888
+ },
889
+ {
890
+ name: 'ebay_get_targeting',
891
+ description: 'Get targeting configuration for a campaign.',
892
+ inputSchema: {
893
+ campaignId: campaignIdSchema,
894
+ },
895
+ },
896
+ {
897
+ name: 'ebay_update_targeting',
898
+ description: 'Update targeting configuration for a campaign.',
899
+ inputSchema: {
900
+ campaignId: campaignIdSchema,
901
+ targeting: z.record(z.unknown()).describe('Updated targeting configuration'),
902
+ },
903
+ },
904
+ // ========================================
905
+ // SUGGESTIONS (2 tools)
906
+ // ========================================
907
+ {
908
+ name: 'ebay_suggest_bids',
909
+ description: 'Get bid suggestions for an ad group. Helps optimize bid amounts based on competition.',
910
+ inputSchema: {
911
+ campaignId: campaignIdSchema,
912
+ adGroupId: adGroupIdSchema,
913
+ },
914
+ },
915
+ {
916
+ name: 'ebay_suggest_keywords',
917
+ description: 'Get keyword suggestions for an ad group. Returns relevant keywords based on listings.',
918
+ inputSchema: {
919
+ campaignId: campaignIdSchema,
920
+ adGroupId: adGroupIdSchema,
921
+ },
922
+ },
923
+ // ========================================
924
+ // REPORTING (6 tools)
925
+ // ========================================
926
+ {
927
+ name: 'ebay_create_report_task',
928
+ description: 'Create an asynchronous report generation task. Reports are generated in the background.',
929
+ inputSchema: {
930
+ reportTask: z
931
+ .object({
932
+ reportType: z
933
+ .enum([
934
+ 'CAMPAIGN_PERFORMANCE_REPORT',
935
+ 'LISTING_PERFORMANCE_REPORT',
936
+ 'KEYWORD_PERFORMANCE_REPORT',
937
+ 'ACCOUNT_PERFORMANCE_REPORT',
938
+ ])
939
+ .describe('Type of report to generate'),
940
+ campaignIds: z.array(z.string()).optional().describe('Campaign IDs to include in report'),
941
+ dateFrom: z.string().describe('Start date for report data (ISO 8601 format)'),
942
+ dateTo: z.string().describe('End date for report data (ISO 8601 format)'),
943
+ marketplaceId: z.nativeEnum(MarketplaceId).optional().describe('Marketplace ID'),
944
+ dimensions: z.array(z.string()).optional().describe('Report dimensions'),
945
+ metrics: z.array(z.string()).optional().describe('Report metrics'),
946
+ })
947
+ .describe('Report task configuration'),
948
+ },
949
+ },
950
+ {
951
+ name: 'ebay_get_report_task',
952
+ description: 'Get status and details of a specific report task.',
953
+ inputSchema: {
954
+ reportTaskId: reportTaskIdSchema,
955
+ },
956
+ },
957
+ {
958
+ name: 'ebay_get_report_tasks',
959
+ description: 'Get all report tasks with optional filters.',
960
+ inputSchema: {
961
+ limit: limitSchema,
962
+ offset: offsetSchema,
963
+ reportTaskStatuses: z
964
+ .string()
965
+ .optional()
966
+ .describe('Comma-separated status filters: PENDING, IN_PROGRESS, SUCCESS, FAILED'),
967
+ },
968
+ },
969
+ {
970
+ name: 'ebay_get_ad_report',
971
+ description: 'Download a completed ad report by report ID.',
972
+ inputSchema: {
973
+ reportId: reportIdSchema,
974
+ },
975
+ },
976
+ {
977
+ name: 'ebay_get_ad_report_metadata',
978
+ description: 'Get metadata for all available report types. Returns dimensions, metrics, and filters.',
979
+ inputSchema: {},
980
+ },
981
+ {
982
+ name: 'ebay_get_ad_report_metadata_for_type',
983
+ description: 'Get metadata for a specific report type.',
984
+ inputSchema: {
985
+ reportType: z
986
+ .enum([
987
+ 'CAMPAIGN_PERFORMANCE_REPORT',
988
+ 'LISTING_PERFORMANCE_REPORT',
989
+ 'KEYWORD_PERFORMANCE_REPORT',
990
+ 'ACCOUNT_PERFORMANCE_REPORT',
991
+ ])
992
+ .describe('Report type'),
993
+ },
994
+ },
995
+ // ========================================
996
+ // PROMOTIONS - ITEM PROMOTION (9 tools)
997
+ // ========================================
998
+ {
999
+ name: 'ebay_get_promotions',
1000
+ description: 'Get all item promotions with optional filters. Returns order discounts, shipping discounts, etc.',
1001
+ inputSchema: {
1002
+ marketplaceId: z.nativeEnum(MarketplaceId).optional().describe('Filter by marketplace ID'),
1003
+ promotionStatus: z
1004
+ .string()
1005
+ .optional()
1006
+ .describe('Filter by status: DRAFT, SCHEDULED, RUNNING, PAUSED, ENDED'),
1007
+ promotionType: z
1008
+ .string()
1009
+ .optional()
1010
+ .describe('Filter by type: ORDER_DISCOUNT, MARKDOWN_SALE, etc.'),
1011
+ limit: limitSchema,
1012
+ offset: offsetSchema,
1013
+ },
1014
+ },
1015
+ {
1016
+ name: 'ebay_get_item_promotion',
1017
+ description: 'Get details of a specific item promotion.',
1018
+ inputSchema: {
1019
+ promotionId: promotionIdSchema,
1020
+ },
1021
+ },
1022
+ {
1023
+ name: 'ebay_create_item_promotion',
1024
+ description: 'Create a new item promotion (order discount, volume pricing, etc.).',
1025
+ inputSchema: {
1026
+ promotion: z
1027
+ .record(z.unknown())
1028
+ .describe('Promotion configuration with discountRules, inventoryCriterion, etc.'),
1029
+ },
1030
+ },
1031
+ {
1032
+ name: 'ebay_update_item_promotion',
1033
+ description: 'Update an existing item promotion.',
1034
+ inputSchema: {
1035
+ promotionId: promotionIdSchema,
1036
+ promotion: z.record(z.unknown()).describe('Updated promotion configuration'),
1037
+ },
1038
+ },
1039
+ {
1040
+ name: 'ebay_delete_item_promotion',
1041
+ description: 'Delete an item promotion.',
1042
+ inputSchema: {
1043
+ promotionId: promotionIdSchema,
1044
+ },
1045
+ },
1046
+ {
1047
+ name: 'ebay_pause_item_promotion',
1048
+ description: 'Pause a running item promotion. Can be resumed later.',
1049
+ inputSchema: {
1050
+ promotionId: promotionIdSchema,
1051
+ },
1052
+ },
1053
+ {
1054
+ name: 'ebay_resume_item_promotion',
1055
+ description: 'Resume a paused item promotion.',
1056
+ inputSchema: {
1057
+ promotionId: promotionIdSchema,
1058
+ },
1059
+ },
1060
+ {
1061
+ name: 'ebay_get_promotion_report',
1062
+ description: 'Get promotion performance report with sales and revenue data.',
1063
+ inputSchema: {
1064
+ marketplaceId: z.nativeEnum(MarketplaceId).describe('Marketplace ID'),
1065
+ promotionStatus: z.string().optional().describe('Filter by promotion status'),
1066
+ promotionType: z.string().optional().describe('Filter by promotion type'),
1067
+ limit: limitSchema,
1068
+ offset: offsetSchema,
1069
+ },
1070
+ },
1071
+ {
1072
+ name: 'ebay_get_promotion_summary_report',
1073
+ description: 'Get summary report of promotion performance across all promotions.',
1074
+ inputSchema: {
1075
+ marketplaceId: z.nativeEnum(MarketplaceId).describe('Marketplace ID'),
1076
+ },
1077
+ },
1078
+ // ========================================
1079
+ // RECOMMENDATION (1 tool - already exists)
1080
+ // ========================================
1081
+ {
1082
+ name: 'ebay_find_listing_recommendations',
1083
+ description: 'Find listing recommendations for items. Returns suggestions to improve listing performance.',
1084
+ inputSchema: {
1085
+ listingIds: z
1086
+ .array(z.string())
1087
+ .optional()
1088
+ .describe('Array of listing IDs to get recommendations for'),
1089
+ filter: z.string().optional().describe('Filter criteria'),
1090
+ limit: limitSchema,
1091
+ offset: offsetSchema,
1092
+ marketplaceId: z.string().optional().describe('Marketplace ID'),
1093
+ },
1094
+ },
1095
+ ];