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.
- package/README.de.md +3 -3
- package/README.es.md +3 -3
- package/README.fr.md +3 -3
- package/README.ja.md +3 -3
- package/README.ko.md +3 -3
- package/README.md +163 -41
- package/README.pt-BR.md +3 -3
- package/README.ru.md +3 -3
- package/README.zh-CN.md +3 -3
- package/build/api/account-management/account.js +633 -297
- package/build/api/analytics-and-report/analytics.js +111 -65
- package/build/api/client.js +199 -140
- package/build/api/clientRequestError.js +23 -0
- package/build/api/clientTrading.js +213 -0
- package/build/api/clientTradingError.js +4 -0
- package/build/api/communication/feedback.js +147 -59
- package/build/api/communication/message.js +134 -81
- package/build/api/communication/negotiation.js +65 -53
- package/build/api/communication/notification.js +458 -164
- package/build/api/developer/developer.js +99 -45
- package/build/api/index.js +23 -8
- package/build/api/listing-management/inventory.js +884 -338
- package/build/api/listing-metadata/metadata.js +416 -170
- package/build/api/listing-metadata/taxonomy.js +187 -42
- package/build/api/marketing-and-promotions/marketing.js +1392 -598
- package/build/api/marketing-and-promotions/recommendation.js +49 -24
- package/build/api/order-management/dispute.js +226 -45
- package/build/api/order-management/fulfillment.js +144 -71
- package/build/api/order-management/orderIssueHelpers.js +61 -0
- package/build/api/other/compliance.js +50 -38
- package/build/api/other/edelivery.js +603 -159
- package/build/api/other/finding.js +280 -0
- package/build/api/other/identity.js +30 -15
- package/build/api/other/translation.js +29 -14
- package/build/api/other/vero.js +113 -27
- package/build/api/rateLimitTracker.js +55 -0
- package/build/api/shared/request.js +189 -98
- package/build/api/trading/trading.js +154 -87
- package/build/auth/credentialSession.js +250 -0
- package/build/auth/oauth.js +298 -171
- package/build/auth/{oauth-metadata.js → oauthMetadata.js} +22 -6
- package/build/auth/oauthMiddleware.js +104 -0
- package/build/auth/{scope-utils.js → scopeUtils.js} +101 -28
- package/build/auth/tokenVerifier.js +243 -0
- package/build/auth/tokenVerifierError.js +21 -0
- package/build/config/environment.js +148 -113
- package/build/config/{tool-families.js → toolFamilies.js} +30 -14
- package/build/index.js +25 -19
- package/build/mcp/{http-transport.js → httpTransport.js} +102 -52
- package/build/mcp/readOnlyFilter.js +67 -0
- package/build/mcp/runtime.js +31 -13
- package/build/mcp/{tool-gating.js → toolGating.js} +77 -49
- package/build/mcp/{ui-bridge.js → uiBridge.js} +80 -23
- package/build/schemas/account-management/account.js +144 -6
- package/build/schemas/analytics/analytics.js +33 -19
- package/build/schemas/communication/messages.js +12 -42
- package/build/schemas/developer/developer.js +135 -0
- package/build/schemas/fulfillment/orders.js +183 -21
- package/build/schemas/index.js +27 -19
- package/build/schemas/inventory-management/inventory.js +17 -9
- package/build/schemas/marketing/marketing.js +480 -25
- package/build/schemas/metadata/metadata.js +11 -6
- package/build/schemas/other/finding.js +27 -0
- package/build/schemas/other/otherApis.js +424 -0
- package/build/schemas/taxonomy/taxonomy.js +11 -5
- package/build/scripts/{auto-setup.js → autoSetup.js} +87 -74
- package/build/scripts/{build-ui.js → buildUi.js} +6 -1
- package/build/scripts/{dev-sync.js → devSync.js} +169 -110
- package/build/scripts/diagnostics.js +52 -44
- package/build/scripts/{download-specs.js → downloadSpecs.js} +29 -21
- package/build/scripts/{interactive-setup.js → interactiveSetup.js} +84 -78
- package/build/scripts/setup.js +241 -178
- package/build/scripts/{setup-shared.js → setupShared.js} +29 -7
- package/build/scripts/skills.js +35 -27
- package/build/scripts/updateApiStatusDoc.js +71 -0
- package/build/serverHttp.js +90 -0
- package/build/skills/content.js +124 -118
- package/build/skills/index.js +22 -10
- package/build/skills/install.js +21 -10
- package/build/skills/markers.js +50 -15
- package/build/skills/{registry-snapshot.js → registrySnapshot.js} +8 -2
- package/build/skills/render.js +41 -14
- package/build/skills/targets.js +49 -17
- package/build/tools/categories/account.js +166 -264
- package/build/tools/categories/analytics.js +11 -22
- package/build/tools/categories/browse.js +17 -0
- package/build/tools/categories/communication.js +124 -399
- package/build/tools/categories/connector.js +23 -20
- package/build/tools/categories/developer.js +46 -159
- package/build/tools/categories/fulfillment.js +84 -215
- package/build/tools/categories/index.js +6 -14
- package/build/tools/categories/inventory.js +238 -293
- package/build/tools/categories/marketing.js +677 -39
- package/build/tools/categories/metadata.js +190 -117
- package/build/tools/categories/other.js +81 -208
- package/build/tools/categories/taxonomy.js +29 -20
- package/build/tools/categories/{token-management.js → tokenManagement.js} +187 -192
- package/build/tools/categories/trading.js +16 -47
- package/build/tools/contracts.js +34 -24
- package/build/tools/{define-tool.js → defineTool.js} +44 -29
- package/build/tools/registry.js +87 -29
- package/build/tools/schemas.js +3 -57
- package/build/tools/ui/archetypes.js +1 -0
- package/build/tools/ui/{map-helpers.js → mapHelpers.js} +69 -19
- package/build/tools/ui/maps.js +294 -80
- package/build/types/index.js +1 -1
- package/build/ui/card.html +14 -14
- package/build/ui/chart.html +14 -14
- package/build/ui/stat.html +87 -0
- package/build/ui/table.html +14 -14
- package/build/utils/apiStatusFeed.js +95 -0
- package/build/utils/cliOutput.js +15 -0
- package/build/utils/cliUi.js +108 -0
- package/build/utils/communication/feedback.js +57 -77
- package/build/utils/communication/message.js +69 -98
- package/build/utils/communication/negotiation.js +30 -57
- package/build/utils/communication/notification.js +112 -252
- package/build/utils/{date-converter.js → dateConverter.js} +62 -30
- package/build/utils/effectSchema.js +203 -0
- package/build/utils/effectSchemaAdapter.js +121 -0
- package/build/utils/effectSchemaChainMethods.js +146 -0
- package/build/utils/effectSchemaRefinements.js +104 -0
- package/build/utils/effectSchemaStringMethods.js +63 -0
- package/build/utils/effectSchemaTypes.js +47 -0
- package/build/utils/{env-parser.js → envParser.js} +10 -2
- package/build/utils/errors.js +7 -3
- package/build/utils/http.js +148 -89
- package/build/utils/{llm-client-detector.js → llmClientDetector.js} +295 -274
- package/build/utils/logger.js +127 -51
- package/build/utils/{oauth-helper.js → oauthHelper.js} +127 -90
- package/build/utils/other/compliance.js +18 -38
- package/build/utils/other/identity.js +2 -2
- package/build/utils/other/translation.js +4 -4
- package/build/utils/other/vero.js +36 -20
- package/build/utils/schemaHelpers.js +22 -0
- package/build/utils/scopeHelper.js +270 -0
- package/build/utils/securityChecker.js +316 -0
- package/build/utils/{setup-validator.js → setupValidator.js} +113 -94
- package/build/utils/{setup-wizard.js → setupWizard.js} +57 -46
- package/build/utils/{token-utils.js → tokenUtils.js} +2 -2
- package/build/utils/trading/trading.js +35 -0
- package/build/utils/typeGuards.js +12 -0
- package/build/utils/version.js +65 -29
- package/package.json +10 -8
- package/build/api/client-trading.js +0 -124
- package/build/api/communication/shared.js +0 -59
- package/build/api/shared/query-params.js +0 -16
- package/build/auth/credential-session.js +0 -166
- package/build/auth/oauth-middleware.js +0 -100
- package/build/auth/token-verifier.js +0 -186
- package/build/schemas/other/other-apis.js +0 -390
- package/build/scripts/update-api-status-doc.js +0 -44
- package/build/server-http.js +0 -85
- package/build/tools/definitions/marketing.js +0 -1381
- package/build/tools/tool-handlers/marketing.js +0 -312
- package/build/utils/account-management/account.js +0 -818
- package/build/utils/api-status-feed.js +0 -84
- package/build/utils/cli-ui.js +0 -47
- package/build/utils/order-management/dispute.js +0 -369
- package/build/utils/order-management/fulfillment.js +0 -205
- package/build/utils/other/edelivery.js +0 -235
- package/build/utils/schema-helpers.js +0 -13
- package/build/utils/scope-helper.js +0 -207
- package/build/utils/security-checker.js +0 -248
- package/build/utils/type-guards.js +0 -6
- /package/build/auth/{oauth-types.js → oauthTypes.js} +0 -0
- /package/build/{server-http.d.ts → serverHttp.d.ts} +0 -0
- /package/build/tools/ui/{view-models.js → viewModels.js} +0 -0
- /package/build/types/{ebay-enums.js → ebayEnums.js} +0 -0
|
@@ -1,497 +1,222 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { defineTool } from '../../tools/defineTool.js';
|
|
2
|
+
import { Effect } from 'effect';
|
|
3
3
|
import { getAwaitingFeedbackSchema, getFeedbackRatingSummarySchema, getFeedbackSchema, leaveFeedbackForBuyerSchema, respondToFeedbackSchema, } from '../../utils/communication/feedback.js';
|
|
4
4
|
import { bulkUpdateConversationSchema, getConversationSchema, getConversationsSchema, sendMessageSchema, updateConversationSchema, } from '../../utils/communication/message.js';
|
|
5
|
-
import { findEligibleItemsSchema,
|
|
6
|
-
import { createDestinationSchema, createSubscriptionFilterSchema, createSubscriptionSchema, deleteDestinationSchema, deleteSubscriptionFilterSchema, deleteSubscriptionSchema, disableSubscriptionSchema, enableSubscriptionSchema, getConfigSchema, getDestinationSchema, getPublicKeySchema, getSubscriptionFilterSchema, getSubscriptionSchema, getSubscriptionsSchema, getTopicSchema, getTopicsSchema, testSubscriptionSchema, updateConfigSchema, updateDestinationSchema, updateSubscriptionSchema, } from '../../utils/communication/notification.js';
|
|
5
|
+
import { findEligibleItemsSchema, sendOfferToInterestedBuyersSchema, } from '../../utils/communication/negotiation.js';
|
|
6
|
+
import { createDestinationSchema, createSubscriptionFilterSchema, createSubscriptionSchema, deleteDestinationSchema, deleteSubscriptionFilterSchema, deleteSubscriptionSchema, disableSubscriptionSchema, enableSubscriptionSchema, getConfigSchema, getDestinationSchema, getDestinationsSchema, getPublicKeySchema, getSubscriptionFilterSchema, getSubscriptionSchema, getSubscriptionsSchema, getTopicSchema, getTopicsSchema, testSubscriptionSchema, updateConfigSchema, updateDestinationSchema, updateSubscriptionSchema, } from '../../utils/communication/notification.js';
|
|
7
7
|
/**
|
|
8
8
|
* Communication API tools for member messages, notifications, and seller feedback.
|
|
9
9
|
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
* so MCP clients see exactly the fields the handler accepts — no re-parsing against
|
|
14
|
-
* a divergent advertised schema, and no field-name drift between the two.
|
|
10
|
+
* Each tool derives its transport schema from the same Effect-backed object whose inferred
|
|
11
|
+
* args are passed directly to the endpoint method. Handlers stay at the MCP
|
|
12
|
+
* boundary: they run one endpoint Effect and avoid response or input reshaping.
|
|
15
13
|
*/
|
|
16
14
|
export const communicationEntries = [
|
|
17
15
|
// Negotiation API
|
|
18
|
-
|
|
19
|
-
name: '
|
|
20
|
-
description: '
|
|
21
|
-
inputSchema:
|
|
22
|
-
handler: (api, args) =>
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
},
|
|
26
|
-
}),
|
|
27
|
-
rawTool({
|
|
16
|
+
defineTool({
|
|
17
|
+
name: 'ebay_find_eligible_items',
|
|
18
|
+
description: 'Find items eligible for Send Offer to Buyers',
|
|
19
|
+
inputSchema: findEligibleItemsSchema.shape,
|
|
20
|
+
handler: (api, args) => Effect.runPromise(api.negotiation.findEligibleItems(args)),
|
|
21
|
+
}),
|
|
22
|
+
defineTool({
|
|
28
23
|
name: 'ebay_send_offer_to_interested_buyers',
|
|
29
24
|
description: 'Send offer to interested buyers',
|
|
30
25
|
inputSchema: sendOfferToInterestedBuyersSchema.shape,
|
|
31
|
-
handler: (api, args) =>
|
|
32
|
-
const validated = sendOfferToInterestedBuyersSchema.parse(args);
|
|
33
|
-
return api.negotiation.sendOfferToInterestedBuyers(validated);
|
|
34
|
-
},
|
|
35
|
-
}),
|
|
36
|
-
// Message API
|
|
37
|
-
rawTool({
|
|
38
|
-
name: 'ebay_search_messages',
|
|
39
|
-
description: 'Search for buyer-seller messages',
|
|
40
|
-
inputSchema: getConversationsSchema.shape,
|
|
41
|
-
handler: (api, args) => {
|
|
42
|
-
const validated = getConversationsSchema.parse(args);
|
|
43
|
-
return api.message.searchMessages(undefined, validated.limit ? Number(validated.limit) : undefined, validated.offset ? Number(validated.offset) : undefined);
|
|
44
|
-
},
|
|
45
|
-
}),
|
|
46
|
-
rawTool({
|
|
47
|
-
name: 'ebay_get_message',
|
|
48
|
-
description: 'Get a specific message by ID',
|
|
49
|
-
inputSchema: getConversationSchema.shape,
|
|
50
|
-
handler: (api, args) => {
|
|
51
|
-
const validated = getConversationSchema.parse(args);
|
|
52
|
-
return api.message.getMessage(validated.conversation_id);
|
|
53
|
-
},
|
|
54
|
-
}),
|
|
55
|
-
rawTool({
|
|
56
|
-
name: 'ebay_send_message',
|
|
57
|
-
description: 'Send a direct message to a buyer regarding a specific transaction or inquiry. Use this to communicate about orders, answer questions, resolve issues, or provide updates. Provide message_text plus either conversation_id (to reply) or other_party_username (to start a new thread).',
|
|
58
|
-
inputSchema: sendMessageSchema.shape,
|
|
59
|
-
handler: (api, args) => {
|
|
60
|
-
const validated = sendMessageSchema.parse(args);
|
|
61
|
-
return api.message.sendMessage(validated);
|
|
62
|
-
},
|
|
63
|
-
}),
|
|
64
|
-
rawTool({
|
|
65
|
-
name: 'ebay_reply_to_message',
|
|
66
|
-
description: 'Reply to a buyer message in an existing conversation thread',
|
|
67
|
-
inputSchema: {
|
|
68
|
-
messageId: z.string().describe('The conversation/message ID to reply to'),
|
|
69
|
-
messageContent: z.string().describe('The reply message content'),
|
|
70
|
-
},
|
|
71
|
-
handler: (api, args) => {
|
|
72
|
-
if (!args.messageId || !args.messageContent) {
|
|
73
|
-
throw new Error('messageId and messageContent are required');
|
|
74
|
-
}
|
|
75
|
-
return api.message.replyToMessage(args.messageId, args.messageContent);
|
|
76
|
-
},
|
|
26
|
+
handler: (api, args) => Effect.runPromise(api.negotiation.sendOfferToInterestedBuyers(args)),
|
|
77
27
|
}),
|
|
78
28
|
// Notification API
|
|
79
|
-
|
|
29
|
+
defineTool({
|
|
80
30
|
name: 'ebay_get_notification_config',
|
|
81
31
|
description: 'Get notification configuration',
|
|
82
|
-
inputSchema:
|
|
83
|
-
handler: (api, args) =>
|
|
84
|
-
getConfigSchema.parse(args);
|
|
85
|
-
return api.notification.getConfig();
|
|
86
|
-
},
|
|
32
|
+
inputSchema: getConfigSchema.shape,
|
|
33
|
+
handler: (api, args) => Effect.runPromise(api.notification.getConfig(args)),
|
|
87
34
|
}),
|
|
88
|
-
|
|
35
|
+
defineTool({
|
|
89
36
|
name: 'ebay_update_notification_config',
|
|
90
37
|
description: 'Update notification configuration',
|
|
91
38
|
inputSchema: updateConfigSchema.shape,
|
|
92
|
-
handler: (api, args) =>
|
|
93
|
-
const validated = updateConfigSchema.parse(args);
|
|
94
|
-
return api.notification.updateConfig(validated);
|
|
95
|
-
},
|
|
39
|
+
handler: (api, args) => Effect.runPromise(api.notification.updateConfig(args)),
|
|
96
40
|
}),
|
|
97
|
-
|
|
41
|
+
defineTool({
|
|
98
42
|
name: 'ebay_get_notification_destinations',
|
|
99
43
|
description: 'Get all notification destinations (paginated)',
|
|
100
|
-
inputSchema:
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
.describe('Maximum number of destinations to return (10-100, default: 20)'),
|
|
105
|
-
continuationToken: z.string().optional().describe('Token to retrieve next page of results'),
|
|
106
|
-
},
|
|
107
|
-
handler: (api, args) => api.notification.getDestinations(args.limit, args.continuationToken),
|
|
108
|
-
}),
|
|
109
|
-
rawTool({
|
|
44
|
+
inputSchema: getDestinationsSchema.shape,
|
|
45
|
+
handler: (api, args) => Effect.runPromise(api.notification.getDestinations(args)),
|
|
46
|
+
}),
|
|
47
|
+
defineTool({
|
|
110
48
|
name: 'ebay_create_notification_destination',
|
|
111
49
|
description: 'Create a notification destination',
|
|
112
50
|
inputSchema: createDestinationSchema.shape,
|
|
113
|
-
handler: (api, args) =>
|
|
114
|
-
const validated = createDestinationSchema.parse(args);
|
|
115
|
-
return api.notification.createDestination(validated);
|
|
116
|
-
},
|
|
51
|
+
handler: (api, args) => Effect.runPromise(api.notification.createDestination(args)),
|
|
117
52
|
}),
|
|
118
53
|
// Notification API - Destination CRUD
|
|
119
|
-
|
|
54
|
+
defineTool({
|
|
120
55
|
name: 'ebay_get_notification_destination',
|
|
121
56
|
description: 'Get a specific notification destination by ID',
|
|
122
|
-
inputSchema:
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
const validated = getDestinationSchema.parse(args);
|
|
127
|
-
return api.notification.getDestination(validated.destination_id);
|
|
128
|
-
},
|
|
129
|
-
}),
|
|
130
|
-
rawTool({
|
|
57
|
+
inputSchema: getDestinationSchema.shape,
|
|
58
|
+
handler: (api, args) => Effect.runPromise(api.notification.getDestination(args)),
|
|
59
|
+
}),
|
|
60
|
+
defineTool({
|
|
131
61
|
name: 'ebay_update_notification_destination',
|
|
132
62
|
description: 'Update a notification destination',
|
|
133
|
-
inputSchema:
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
endpoint: z.string().optional().describe('HTTPS endpoint URL'),
|
|
138
|
-
verification_token: z
|
|
139
|
-
.string()
|
|
140
|
-
.optional()
|
|
141
|
-
.describe('Verification token (32-80 characters)'),
|
|
142
|
-
})
|
|
143
|
-
.optional()
|
|
144
|
-
.describe('Delivery configuration'),
|
|
145
|
-
name: z.string().optional().describe('Destination name'),
|
|
146
|
-
status: z.string().optional().describe('Status: ENABLED or DISABLED'),
|
|
147
|
-
},
|
|
148
|
-
handler: (api, args) => {
|
|
149
|
-
const validated = updateDestinationSchema.parse(args);
|
|
150
|
-
return api.notification.updateDestination(validated.destination_id, validated);
|
|
151
|
-
},
|
|
152
|
-
}),
|
|
153
|
-
rawTool({
|
|
63
|
+
inputSchema: updateDestinationSchema.shape,
|
|
64
|
+
handler: (api, args) => Effect.runPromise(api.notification.updateDestination(args)),
|
|
65
|
+
}),
|
|
66
|
+
defineTool({
|
|
154
67
|
name: 'ebay_delete_notification_destination',
|
|
155
68
|
description: 'Delete a notification destination',
|
|
156
|
-
inputSchema:
|
|
157
|
-
|
|
158
|
-
},
|
|
159
|
-
handler: (api, args) => {
|
|
160
|
-
const validated = deleteDestinationSchema.parse(args);
|
|
161
|
-
return api.notification.deleteDestination(validated.destination_id);
|
|
162
|
-
},
|
|
69
|
+
inputSchema: deleteDestinationSchema.shape,
|
|
70
|
+
handler: (api, args) => Effect.runPromise(api.notification.deleteDestination(args)),
|
|
163
71
|
}),
|
|
164
72
|
// Notification API - Subscription CRUD
|
|
165
|
-
|
|
73
|
+
defineTool({
|
|
166
74
|
name: 'ebay_get_notification_subscriptions',
|
|
167
75
|
description: 'Get all notification subscriptions (paginated)',
|
|
168
|
-
inputSchema:
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
handler: (api, args) => {
|
|
173
|
-
const validated = getSubscriptionsSchema.parse(args);
|
|
174
|
-
return api.notification.getSubscriptions(validated.limit ? Number(validated.limit) : undefined, validated.continuation_token);
|
|
175
|
-
},
|
|
176
|
-
}),
|
|
177
|
-
rawTool({
|
|
76
|
+
inputSchema: getSubscriptionsSchema.shape,
|
|
77
|
+
handler: (api, args) => Effect.runPromise(api.notification.getSubscriptions(args)),
|
|
78
|
+
}),
|
|
79
|
+
defineTool({
|
|
178
80
|
name: 'ebay_create_notification_subscription',
|
|
179
81
|
description: 'Create a notification subscription',
|
|
180
|
-
inputSchema:
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
delivery_protocol: z.string().optional().describe('Delivery protocol (HTTPS)'),
|
|
185
|
-
format: z.string().optional().describe('Payload format (JSON)'),
|
|
186
|
-
schema_version: z.string().optional().describe('Schema version'),
|
|
187
|
-
})
|
|
188
|
-
.optional()
|
|
189
|
-
.describe('Payload configuration'),
|
|
190
|
-
status: z.string().optional().describe('Status: ENABLED or DISABLED'),
|
|
191
|
-
topic_id: z.string().optional().describe('The notification topic ID'),
|
|
192
|
-
},
|
|
193
|
-
handler: (api, args) => {
|
|
194
|
-
const validated = createSubscriptionSchema.parse(args);
|
|
195
|
-
return api.notification.createSubscription(validated);
|
|
196
|
-
},
|
|
197
|
-
}),
|
|
198
|
-
rawTool({
|
|
82
|
+
inputSchema: createSubscriptionSchema.shape,
|
|
83
|
+
handler: (api, args) => Effect.runPromise(api.notification.createSubscription(args)),
|
|
84
|
+
}),
|
|
85
|
+
defineTool({
|
|
199
86
|
name: 'ebay_get_notification_subscription',
|
|
200
87
|
description: 'Get a specific notification subscription by ID',
|
|
201
|
-
inputSchema:
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
const validated = getSubscriptionSchema.parse(args);
|
|
206
|
-
return api.notification.getSubscription(validated.subscription_id);
|
|
207
|
-
},
|
|
208
|
-
}),
|
|
209
|
-
rawTool({
|
|
88
|
+
inputSchema: getSubscriptionSchema.shape,
|
|
89
|
+
handler: (api, args) => Effect.runPromise(api.notification.getSubscription(args)),
|
|
90
|
+
}),
|
|
91
|
+
defineTool({
|
|
210
92
|
name: 'ebay_update_notification_subscription',
|
|
211
93
|
description: 'Update a notification subscription',
|
|
212
|
-
inputSchema:
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
.object({
|
|
217
|
-
delivery_protocol: z.string().optional().describe('Delivery protocol'),
|
|
218
|
-
format: z.string().optional().describe('Payload format'),
|
|
219
|
-
schema_version: z.string().optional().describe('Schema version'),
|
|
220
|
-
})
|
|
221
|
-
.optional()
|
|
222
|
-
.describe('Payload configuration'),
|
|
223
|
-
status: z.string().optional().describe('Status: ENABLED or DISABLED'),
|
|
224
|
-
},
|
|
225
|
-
handler: (api, args) => {
|
|
226
|
-
const validated = updateSubscriptionSchema.parse(args);
|
|
227
|
-
return api.notification.updateSubscription(validated.subscription_id, validated);
|
|
228
|
-
},
|
|
229
|
-
}),
|
|
230
|
-
rawTool({
|
|
94
|
+
inputSchema: updateSubscriptionSchema.shape,
|
|
95
|
+
handler: (api, args) => Effect.runPromise(api.notification.updateSubscription(args)),
|
|
96
|
+
}),
|
|
97
|
+
defineTool({
|
|
231
98
|
name: 'ebay_delete_notification_subscription',
|
|
232
99
|
description: 'Delete a notification subscription',
|
|
233
|
-
inputSchema:
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
const validated = deleteSubscriptionSchema.parse(args);
|
|
238
|
-
return api.notification.deleteSubscription(validated.subscription_id);
|
|
239
|
-
},
|
|
240
|
-
}),
|
|
241
|
-
rawTool({
|
|
100
|
+
inputSchema: deleteSubscriptionSchema.shape,
|
|
101
|
+
handler: (api, args) => Effect.runPromise(api.notification.deleteSubscription(args)),
|
|
102
|
+
}),
|
|
103
|
+
defineTool({
|
|
242
104
|
name: 'ebay_disable_notification_subscription',
|
|
243
105
|
description: 'Disable a notification subscription',
|
|
244
|
-
inputSchema:
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
const validated = disableSubscriptionSchema.parse(args);
|
|
249
|
-
return api.notification.disableSubscription(validated.subscription_id);
|
|
250
|
-
},
|
|
251
|
-
}),
|
|
252
|
-
rawTool({
|
|
106
|
+
inputSchema: disableSubscriptionSchema.shape,
|
|
107
|
+
handler: (api, args) => Effect.runPromise(api.notification.disableSubscription(args)),
|
|
108
|
+
}),
|
|
109
|
+
defineTool({
|
|
253
110
|
name: 'ebay_enable_notification_subscription',
|
|
254
111
|
description: 'Enable a notification subscription',
|
|
255
|
-
inputSchema:
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
const validated = enableSubscriptionSchema.parse(args);
|
|
260
|
-
return api.notification.enableSubscription(validated.subscription_id);
|
|
261
|
-
},
|
|
262
|
-
}),
|
|
263
|
-
rawTool({
|
|
112
|
+
inputSchema: enableSubscriptionSchema.shape,
|
|
113
|
+
handler: (api, args) => Effect.runPromise(api.notification.enableSubscription(args)),
|
|
114
|
+
}),
|
|
115
|
+
defineTool({
|
|
264
116
|
name: 'ebay_test_notification_subscription',
|
|
265
117
|
description: 'Test a notification subscription by sending a test message',
|
|
266
|
-
inputSchema:
|
|
267
|
-
|
|
268
|
-
},
|
|
269
|
-
handler: (api, args) => {
|
|
270
|
-
const validated = testSubscriptionSchema.parse(args);
|
|
271
|
-
return api.notification.testSubscription(validated.subscription_id);
|
|
272
|
-
},
|
|
118
|
+
inputSchema: testSubscriptionSchema.shape,
|
|
119
|
+
handler: (api, args) => Effect.runPromise(api.notification.testSubscription(args)),
|
|
273
120
|
}),
|
|
274
121
|
// Notification API - Subscription Filters
|
|
275
|
-
|
|
122
|
+
defineTool({
|
|
276
123
|
name: 'ebay_create_notification_subscription_filter',
|
|
277
124
|
description: 'Create a filter for a notification subscription',
|
|
278
|
-
inputSchema:
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
.optional()
|
|
283
|
-
.describe('JSON Schema document to filter notifications'),
|
|
284
|
-
},
|
|
285
|
-
handler: (api, args) => {
|
|
286
|
-
const validated = createSubscriptionFilterSchema.parse(args);
|
|
287
|
-
return api.notification.createSubscriptionFilter(validated.subscription_id, validated);
|
|
288
|
-
},
|
|
289
|
-
}),
|
|
290
|
-
rawTool({
|
|
125
|
+
inputSchema: createSubscriptionFilterSchema.shape,
|
|
126
|
+
handler: (api, args) => Effect.runPromise(api.notification.createSubscriptionFilter(args)),
|
|
127
|
+
}),
|
|
128
|
+
defineTool({
|
|
291
129
|
name: 'ebay_get_notification_subscription_filter',
|
|
292
130
|
description: 'Get a specific subscription filter',
|
|
293
|
-
inputSchema:
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
handler: (api, args) => {
|
|
298
|
-
const validated = getSubscriptionFilterSchema.parse(args);
|
|
299
|
-
return api.notification.getSubscriptionFilter(validated.subscription_id, validated.filter_id);
|
|
300
|
-
},
|
|
301
|
-
}),
|
|
302
|
-
rawTool({
|
|
131
|
+
inputSchema: getSubscriptionFilterSchema.shape,
|
|
132
|
+
handler: (api, args) => Effect.runPromise(api.notification.getSubscriptionFilter(args)),
|
|
133
|
+
}),
|
|
134
|
+
defineTool({
|
|
303
135
|
name: 'ebay_delete_notification_subscription_filter',
|
|
304
136
|
description: 'Delete a subscription filter',
|
|
305
|
-
inputSchema:
|
|
306
|
-
|
|
307
|
-
filter_id: z.string().describe('The unique identifier for the filter'),
|
|
308
|
-
},
|
|
309
|
-
handler: (api, args) => {
|
|
310
|
-
const validated = deleteSubscriptionFilterSchema.parse(args);
|
|
311
|
-
return api.notification.deleteSubscriptionFilter(validated.subscription_id, validated.filter_id);
|
|
312
|
-
},
|
|
137
|
+
inputSchema: deleteSubscriptionFilterSchema.shape,
|
|
138
|
+
handler: (api, args) => Effect.runPromise(api.notification.deleteSubscriptionFilter(args)),
|
|
313
139
|
}),
|
|
314
140
|
// Notification API - Topics
|
|
315
|
-
|
|
141
|
+
defineTool({
|
|
316
142
|
name: 'ebay_get_notification_topic',
|
|
317
143
|
description: 'Get a specific notification topic by ID',
|
|
318
|
-
inputSchema:
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
const validated = getTopicSchema.parse(args);
|
|
323
|
-
return api.notification.getTopic(validated.topic_id);
|
|
324
|
-
},
|
|
325
|
-
}),
|
|
326
|
-
rawTool({
|
|
144
|
+
inputSchema: getTopicSchema.shape,
|
|
145
|
+
handler: (api, args) => Effect.runPromise(api.notification.getTopic(args)),
|
|
146
|
+
}),
|
|
147
|
+
defineTool({
|
|
327
148
|
name: 'ebay_get_notification_topics',
|
|
328
149
|
description: 'Get all available notification topics (paginated)',
|
|
329
|
-
inputSchema:
|
|
330
|
-
|
|
331
|
-
continuation_token: z.string().optional().describe('Token for pagination'),
|
|
332
|
-
},
|
|
333
|
-
handler: (api, args) => {
|
|
334
|
-
const validated = getTopicsSchema.parse(args);
|
|
335
|
-
return api.notification.getTopics(validated.limit ? Number(validated.limit) : undefined, validated.continuation_token);
|
|
336
|
-
},
|
|
150
|
+
inputSchema: getTopicsSchema.shape,
|
|
151
|
+
handler: (api, args) => Effect.runPromise(api.notification.getTopics(args)),
|
|
337
152
|
}),
|
|
338
153
|
// Notification API - Public Key
|
|
339
|
-
|
|
154
|
+
defineTool({
|
|
340
155
|
name: 'ebay_get_notification_public_key',
|
|
341
156
|
description: 'Get a public key for verifying notification signatures',
|
|
342
|
-
inputSchema:
|
|
343
|
-
|
|
344
|
-
},
|
|
345
|
-
handler: (api, args) => {
|
|
346
|
-
const validated = getPublicKeySchema.parse(args);
|
|
347
|
-
return api.notification.getPublicKey(validated.public_key_id);
|
|
348
|
-
},
|
|
157
|
+
inputSchema: getPublicKeySchema.shape,
|
|
158
|
+
handler: (api, args) => Effect.runPromise(api.notification.getPublicKey(args)),
|
|
349
159
|
}),
|
|
350
160
|
// Message API - Conversations
|
|
351
|
-
|
|
161
|
+
defineTool({
|
|
352
162
|
name: 'ebay_get_conversations',
|
|
353
163
|
description: 'Get all buyer-seller conversations (paginated)',
|
|
354
164
|
inputSchema: getConversationsSchema.shape,
|
|
355
|
-
handler: (api, args) =>
|
|
356
|
-
const validated = getConversationsSchema.parse(args);
|
|
357
|
-
return api.message.getConversations(undefined, validated.limit ? Number(validated.limit) : undefined, validated.offset ? Number(validated.offset) : undefined);
|
|
358
|
-
},
|
|
165
|
+
handler: (api, args) => Effect.runPromise(api.message.getConversations(args)),
|
|
359
166
|
}),
|
|
360
|
-
|
|
167
|
+
defineTool({
|
|
361
168
|
name: 'ebay_get_conversation',
|
|
362
169
|
description: 'Get a specific conversation by ID',
|
|
363
170
|
inputSchema: getConversationSchema.shape,
|
|
364
|
-
handler: (api, args) =>
|
|
365
|
-
const validated = getConversationSchema.parse(args);
|
|
366
|
-
return api.message.getConversation(validated.conversation_id);
|
|
367
|
-
},
|
|
171
|
+
handler: (api, args) => Effect.runPromise(api.message.getConversation(args)),
|
|
368
172
|
}),
|
|
369
|
-
|
|
173
|
+
defineTool({
|
|
174
|
+
name: 'ebay_send_message',
|
|
175
|
+
description: 'Send a direct message to a buyer regarding a specific transaction or inquiry. Use this to communicate about orders, answer questions, resolve issues, or provide updates.',
|
|
176
|
+
inputSchema: sendMessageSchema.shape,
|
|
177
|
+
handler: (api, args) => Effect.runPromise(api.message.sendMessage(args)),
|
|
178
|
+
}),
|
|
179
|
+
defineTool({
|
|
370
180
|
name: 'ebay_bulk_update_conversation',
|
|
371
|
-
description: 'Bulk update multiple conversations. Each entry sets
|
|
181
|
+
description: 'Bulk update multiple conversations. Each entry sets conversationStatus (ACTIVE, ARCHIVE, DELETE, READ, UNREAD) for a conversationId.',
|
|
372
182
|
inputSchema: bulkUpdateConversationSchema.shape,
|
|
373
|
-
handler: (api, args) =>
|
|
374
|
-
const validated = bulkUpdateConversationSchema.parse(args);
|
|
375
|
-
return api.message.bulkUpdateConversation(validated);
|
|
376
|
-
},
|
|
183
|
+
handler: (api, args) => Effect.runPromise(api.message.bulkUpdateConversation(args)),
|
|
377
184
|
}),
|
|
378
|
-
|
|
185
|
+
defineTool({
|
|
379
186
|
name: 'ebay_update_conversation',
|
|
380
|
-
description: 'Update a single conversation (
|
|
187
|
+
description: 'Update a single conversation (conversationStatus: ACTIVE, ARCHIVE, DELETE; or read flag).',
|
|
381
188
|
inputSchema: updateConversationSchema.shape,
|
|
382
|
-
handler: (api, args) =>
|
|
383
|
-
const validated = updateConversationSchema.parse(args);
|
|
384
|
-
return api.message.updateConversation(validated);
|
|
385
|
-
},
|
|
189
|
+
handler: (api, args) => Effect.runPromise(api.message.updateConversation(args)),
|
|
386
190
|
}),
|
|
387
191
|
// Feedback API
|
|
388
|
-
|
|
192
|
+
defineTool({
|
|
389
193
|
name: 'ebay_get_feedback',
|
|
390
194
|
description: 'Get feedback for a user by type',
|
|
391
|
-
inputSchema:
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
filter: z.string().optional().describe('Filter criteria'),
|
|
396
|
-
limit: z.string().optional().describe('Maximum number of feedback items to return'),
|
|
397
|
-
listing_id: z.string().optional().describe('Filter by listing ID'),
|
|
398
|
-
offset: z.string().optional().describe('Number of items to skip'),
|
|
399
|
-
order_line_item_id: z.string().optional().describe('Filter by order line item ID'),
|
|
400
|
-
sort: z.string().optional().describe('Sort order'),
|
|
401
|
-
transaction_id: z.string().optional().describe('Filter by transaction ID'),
|
|
402
|
-
},
|
|
403
|
-
handler: (api, args) => {
|
|
404
|
-
const validated = getFeedbackSchema.parse(args);
|
|
405
|
-
return api.feedback.getFeedback(validated.transaction_id ?? '');
|
|
406
|
-
},
|
|
407
|
-
}),
|
|
408
|
-
rawTool({
|
|
195
|
+
inputSchema: getFeedbackSchema.shape,
|
|
196
|
+
handler: (api, args) => Effect.runPromise(api.feedback.getFeedback(args)),
|
|
197
|
+
}),
|
|
198
|
+
defineTool({
|
|
409
199
|
name: 'ebay_leave_feedback_for_buyer',
|
|
410
|
-
description: 'Leave feedback for a buyer. Provide
|
|
200
|
+
description: 'Leave feedback for a buyer. Provide orderLineItemId, commentType (POSITIVE/NEUTRAL/NEGATIVE), and commentText.',
|
|
411
201
|
inputSchema: leaveFeedbackForBuyerSchema.shape,
|
|
412
|
-
handler: (api, args) =>
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
},
|
|
416
|
-
}),
|
|
417
|
-
rawTool({
|
|
418
|
-
name: 'ebay_get_feedback_summary',
|
|
419
|
-
description: 'Get feedback summary for the seller',
|
|
420
|
-
inputSchema: {},
|
|
421
|
-
outputSchema: {
|
|
422
|
-
type: 'object',
|
|
423
|
-
properties: {},
|
|
424
|
-
description: 'Success response',
|
|
425
|
-
},
|
|
426
|
-
handler: (api) => api.feedback.getFeedbackSummary(),
|
|
427
|
-
}),
|
|
428
|
-
rawTool({
|
|
202
|
+
handler: (api, args) => Effect.runPromise(api.feedback.leaveFeedbackForBuyer(args)),
|
|
203
|
+
}),
|
|
204
|
+
defineTool({
|
|
429
205
|
name: 'ebay_get_awaiting_feedback',
|
|
430
206
|
description: 'Get transactions awaiting feedback from the seller',
|
|
431
|
-
inputSchema:
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
sort: z.string().optional().describe('Sort order'),
|
|
436
|
-
},
|
|
437
|
-
handler: (api, args) => {
|
|
438
|
-
const validated = getAwaitingFeedbackSchema.parse(args);
|
|
439
|
-
return api.feedback.getAwaitingFeedback(validated.filter, validated.limit ? Number(validated.limit) : undefined, validated.offset ? Number(validated.offset) : undefined);
|
|
440
|
-
},
|
|
441
|
-
}),
|
|
442
|
-
rawTool({
|
|
207
|
+
inputSchema: getAwaitingFeedbackSchema.shape,
|
|
208
|
+
handler: (api, args) => Effect.runPromise(api.feedback.getAwaitingFeedback(args)),
|
|
209
|
+
}),
|
|
210
|
+
defineTool({
|
|
443
211
|
name: 'ebay_respond_to_feedback',
|
|
444
212
|
description: 'Respond to feedback received from a buyer',
|
|
445
|
-
inputSchema:
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
.string()
|
|
450
|
-
.optional()
|
|
451
|
-
.describe('The response text content (max 500 characters)'),
|
|
452
|
-
response_type: z.string().optional().describe('The response type: REPLY or FOLLOW_UP'),
|
|
453
|
-
},
|
|
454
|
-
handler: (api, args) => {
|
|
455
|
-
const validated = respondToFeedbackSchema.parse(args);
|
|
456
|
-
return api.feedback.respondToFeedback(validated.feedback_id ?? '', validated.response_text ?? '');
|
|
457
|
-
},
|
|
458
|
-
}),
|
|
459
|
-
rawTool({
|
|
213
|
+
inputSchema: respondToFeedbackSchema.shape,
|
|
214
|
+
handler: (api, args) => Effect.runPromise(api.feedback.respondToFeedback(args)),
|
|
215
|
+
}),
|
|
216
|
+
defineTool({
|
|
460
217
|
name: 'ebay_get_feedback_rating_summary',
|
|
461
218
|
description: 'Get feedback rating summary for a user',
|
|
462
|
-
inputSchema:
|
|
463
|
-
|
|
464
|
-
filter: z.string().describe('Filter with required ratingType parameter'),
|
|
465
|
-
},
|
|
466
|
-
handler: (api, args) => {
|
|
467
|
-
getFeedbackRatingSummarySchema.parse(args);
|
|
468
|
-
return api.feedback.getFeedbackRatingSummary();
|
|
469
|
-
},
|
|
470
|
-
}),
|
|
471
|
-
];
|
|
472
|
-
/**
|
|
473
|
-
* Handler-only negotiation tool.
|
|
474
|
-
*
|
|
475
|
-
* `ebay_find_eligible_items` has a handler but no registered definition (matching
|
|
476
|
-
* prior behavior, where it was absent from the definitions catalog). It is exposed
|
|
477
|
-
* via `handlerOnlyEntries` so it remains callable through `executeTool` without
|
|
478
|
-
* being advertised to MCP clients.
|
|
479
|
-
*/
|
|
480
|
-
export const communicationHandlerOnlyEntries = [
|
|
481
|
-
rawTool({
|
|
482
|
-
name: 'ebay_find_eligible_items',
|
|
483
|
-
description: 'Find items eligible for Send Offer to Buyers',
|
|
484
|
-
inputSchema: {
|
|
485
|
-
marketplace_id: z
|
|
486
|
-
.string()
|
|
487
|
-
.optional()
|
|
488
|
-
.describe('The eBay marketplace ID (X-EBAY-C-MARKETPLACE-ID header)'),
|
|
489
|
-
limit: z.string().optional().describe('Maximum number of items to return (1-200)'),
|
|
490
|
-
offset: z.string().optional().describe('Number of items to skip'),
|
|
491
|
-
},
|
|
492
|
-
handler: (api, args) => {
|
|
493
|
-
const validated = findEligibleItemsSchema.parse(args);
|
|
494
|
-
return api.negotiation.findEligibleItems(validated.marketplace_id, validated.limit ? Number(validated.limit) : undefined, validated.offset ? Number(validated.offset) : undefined);
|
|
495
|
-
},
|
|
219
|
+
inputSchema: getFeedbackRatingSummarySchema.shape,
|
|
220
|
+
handler: (api, args) => Effect.runPromise(api.feedback.getFeedbackRatingSummary(args)),
|
|
496
221
|
}),
|
|
497
222
|
];
|