ebay-mcp 2.0.5 → 2.0.6
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.md +18 -18
- package/build/auth/credentialSession.js +2 -2
- package/build/auth/oauth.js +6 -6
- package/build/auth/oauthHelper.js +2 -2
- package/build/auth/oauthMiddleware.js +1 -1
- package/build/auth/scopeUtils.js +1 -1
- package/build/{tools/categories/tokenManagement.js → auth/tokenManagementTools.js} +5 -5
- package/build/auth/tokenVerifier.js +2 -2
- package/build/{scripts → cli}/autoSetup.js +2 -2
- package/build/{scripts → cli}/diagnostics.js +10 -10
- package/build/{scripts → cli}/interactiveSetup.js +6 -6
- package/build/{scripts → cli}/scopeHelper.js +2 -2
- package/build/{scripts → cli}/securityChecker.js +1 -1
- package/build/{scripts → cli}/setup.js +10 -10
- package/build/{scripts → cli}/setupValidator.js +4 -4
- package/build/{scripts → cli}/setupWizard.js +1 -1
- package/build/{skills → cli/skills}/content.js +3 -3
- package/build/{skills → cli/skills}/index.js +11 -11
- package/build/{skills → cli/skills}/install.js +1 -1
- package/build/{skills → cli/skills}/registrySnapshot.js +1 -1
- package/build/{skills → cli/skills}/render.js +1 -1
- package/build/{scripts → cli}/skills.js +4 -4
- package/build/{api/account-management/account.js → ebay-apis/account/accountApi.js} +1 -1
- package/build/{schemas/account-management/account.js → ebay-apis/account/accountSchemas.js} +1 -1
- package/build/{tools/categories/account.js → ebay-apis/account/accountTools.js} +2 -2
- package/build/{api/account-management/accountV2.js → ebay-apis/account/accountV2Api.js} +1 -1
- package/build/{schemas/account-management/accountV2.js → ebay-apis/account/accountV2Schemas.js} +1 -1
- package/build/{tools/categories/accountV2.js → ebay-apis/account/accountV2Tools.js} +2 -2
- package/build/{api/analytics-and-report/analytics.js → ebay-apis/analytics/analyticsApi.js} +1 -1
- package/build/{tools/categories/analytics.js → ebay-apis/analytics/analyticsTools.js} +3 -3
- package/build/{api/other/browse.js → ebay-apis/browse/browseApi.js} +5 -5
- package/build/{api/other → ebay-apis/browse}/browseFilter.js +1 -1
- package/build/{api/other → ebay-apis/browse}/browseMappers.js +2 -2
- package/build/{tools/categories/browse.js → ebay-apis/browse/browseTools.js} +2 -2
- package/build/{api/other → ebay-apis/browse}/browseValidators.js +2 -2
- package/build/{tools/categories/communication.js → ebay-apis/communication/communicationTools.js} +5 -5
- package/build/{api/communication/feedback.js → ebay-apis/communication/feedbackApi.js} +1 -1
- package/build/{api/communication/message.js → ebay-apis/communication/messageApi.js} +1 -1
- package/build/{schemas/communication/messages.js → ebay-apis/communication/messageSchemas.js} +1 -1
- package/build/{api/communication/negotiation.js → ebay-apis/communication/negotiationApi.js} +1 -1
- package/build/{api/communication/notification.js → ebay-apis/communication/notificationApi.js} +1 -1
- package/build/{utils/communication/notification.js → ebay-apis/communication/notificationHelpers.js} +1 -1
- package/build/{api/developer/developer.js → ebay-apis/developer/developerApi.js} +2 -2
- package/build/{tools/categories/developer.js → ebay-apis/developer/developerTools.js} +4 -4
- package/build/ebay-apis/ebaySellerApi.js +175 -0
- package/build/{api/listing-management/feed.js → ebay-apis/feed/feedApi.js} +3 -3
- package/build/{api/listing-management/feedReportTasks.js → ebay-apis/feed/feedReportTasksApi.js} +3 -3
- package/build/{api/listing-management/feedRequest.js → ebay-apis/feed/feedRequestApi.js} +3 -3
- package/build/{api/listing-management/feedSchedules.js → ebay-apis/feed/feedSchedulesApi.js} +3 -3
- package/build/{api/listing-management/feedTasks.js → ebay-apis/feed/feedTasksApi.js} +3 -3
- package/build/{tools/categories/feed.js → ebay-apis/feed/feedTools.js} +5 -5
- package/build/{api/account-management/finances.js → ebay-apis/finances/financesApi.js} +3 -3
- package/build/{tools/categories/finances.js → ebay-apis/finances/financesTools.js} +3 -3
- package/build/{api/order-management/dispute.js → ebay-apis/fulfillment/disputeApi.js} +3 -3
- package/build/{api/order-management/fulfillment.js → ebay-apis/fulfillment/fulfillmentApi.js} +1 -1
- package/build/{tools/categories/fulfillment.js → ebay-apis/fulfillment/fulfillmentTools.js} +4 -4
- package/build/{schemas/fulfillment/orders.js → ebay-apis/fulfillment/ordersSchemas.js} +1 -1
- package/build/{api/listing-management/inventory.js → ebay-apis/inventory/inventoryApi.js} +3 -3
- package/build/{schemas/inventory-management/inventory.js → ebay-apis/inventory/inventorySchemas.js} +1 -1
- package/build/{tools/categories/inventory.js → ebay-apis/inventory/inventoryTools.js} +4 -4
- package/build/{api/listing-management/items.js → ebay-apis/inventory/itemsApi.js} +2 -2
- package/build/{api/listing-management/locations.js → ebay-apis/inventory/locationsApi.js} +2 -2
- package/build/{api/listing-management/media.js → ebay-apis/inventory/mediaApi.js} +5 -5
- package/build/{api/listing-management/mediaAttach.js → ebay-apis/inventory/mediaAttachApi.js} +2 -2
- package/build/{api/listing-management/mediaResources.js → ebay-apis/inventory/mediaResourcesApi.js} +4 -4
- package/build/{tools/categories/media.js → ebay-apis/inventory/mediaTools.js} +5 -5
- package/build/{api/listing-management/offerFormat.js → ebay-apis/inventory/offerFormatApi.js} +3 -3
- package/build/{api/listing-management/offers.js → ebay-apis/inventory/offersApi.js} +3 -3
- package/build/{api/order-management/logistics.js → ebay-apis/logistics/logisticsApi.js} +2 -2
- package/build/{schemas/fulfillment/logistics.js → ebay-apis/logistics/logisticsSchemas.js} +2 -2
- package/build/{tools/categories/logistics.js → ebay-apis/logistics/logisticsTools.js} +4 -4
- package/build/{api/marketing-and-promotions/ads.js → ebay-apis/marketing/adsApi.js} +2 -2
- package/build/{schemas/marketing/ads.js → ebay-apis/marketing/adsSchemas.js} +2 -2
- package/build/{api/marketing-and-promotions/campaigns.js → ebay-apis/marketing/campaignsApi.js} +2 -2
- package/build/{schemas/marketing/campaigns.js → ebay-apis/marketing/campaignsSchemas.js} +1 -1
- package/build/{api/marketing-and-promotions/marketing.js → ebay-apis/marketing/marketingApi.js} +4 -4
- package/build/ebay-apis/marketing/marketingSchemas.js +13 -0
- package/build/{tools/categories/marketing.js → ebay-apis/marketing/marketingTools.js} +2 -2
- package/build/{api/marketing-and-promotions/promotions.js → ebay-apis/marketing/promotionsApi.js} +2 -2
- package/build/{schemas/marketing/promotions.js → ebay-apis/marketing/promotionsSchemas.js} +2 -2
- package/build/{api/marketing-and-promotions/recommendation.js → ebay-apis/marketing/recommendationApi.js} +1 -1
- package/build/{api/marketing-and-promotions/reports.js → ebay-apis/marketing/reportsApi.js} +2 -2
- package/build/{schemas/marketing/reports.js → ebay-apis/marketing/reportsSchemas.js} +1 -1
- package/build/{api/listing-metadata/metadata.js → ebay-apis/metadata/metadataApi.js} +2 -2
- package/build/{api/listing-metadata/metadataShipping.js → ebay-apis/metadata/metadataShippingApi.js} +2 -2
- package/build/{schemas/metadata/shipping.js → ebay-apis/metadata/metadataShippingSchemas.js} +1 -1
- package/build/{tools/categories/metadata.js → ebay-apis/metadata/metadataTools.js} +3 -3
- package/build/{api/other/edelivery.js → ebay-apis/other/edelivery/edeliveryApi.js} +1 -1
- package/build/{api/other/identity.js → ebay-apis/other/identity/identityApi.js} +2 -2
- package/build/{utils/other/identity.js → ebay-apis/other/identity/identityHelpers.js} +2 -2
- package/build/{tools/categories/other.js → ebay-apis/other/otherTools.js} +2 -2
- package/build/{api/other/translation.js → ebay-apis/other/translation/translationApi.js} +1 -1
- package/build/{utils/other/translation.js → ebay-apis/other/translation/translationHelpers.js} +2 -2
- package/build/{api/other/vero.js → ebay-apis/other/vero/veroApi.js} +1 -1
- package/build/{utils/other/vero.js → ebay-apis/other/vero/veroHelpers.js} +2 -2
- package/build/{api/listing-management/stores.js → ebay-apis/stores/storesApi.js} +2 -2
- package/build/{tools/categories/stores.js → ebay-apis/stores/storesTools.js} +2 -2
- package/build/{api/listing-metadata/charity.js → ebay-apis/taxonomy/charityApi.js} +2 -2
- package/build/{tools/categories/charity.js → ebay-apis/taxonomy/charityTools.js} +2 -2
- package/build/{api/listing-metadata/taxonomy.js → ebay-apis/taxonomy/taxonomyApi.js} +3 -3
- package/build/{tools/categories/taxonomy.js → ebay-apis/taxonomy/taxonomyTools.js} +3 -3
- package/build/{api/trading/listingFormat.js → ebay-apis/trading/listingFormatHelpers.js} +4 -4
- package/build/{api/trading/trading.js → ebay-apis/trading/tradingApi.js} +4 -4
- package/build/{utils/trading/trading.js → ebay-apis/trading/tradingHelpers.js} +1 -1
- package/build/{tools/categories/trading.js → ebay-apis/trading/tradingTools.js} +2 -2
- package/build/{api/shared → ebay-client}/download.js +1 -1
- package/build/{api/client → ebay-client}/ebayApiClient.js +9 -9
- package/build/{api/shared → ebay-client}/location.js +1 -1
- package/build/{api/shared → ebay-client}/request.js +1 -1
- package/build/{api/client → ebay-client}/tradingApiClient.js +7 -7
- package/build/index.js +8 -8
- package/build/{tools/categories/connector.js → server/connectorTools.js} +1 -1
- package/build/{mcp → server}/httpTransport.js +5 -5
- package/build/{mcp → server}/readOnlyFilter.js +6 -0
- package/build/{mcp → server}/runtime.js +9 -9
- package/build/{mcp → server}/toolGating.js +3 -3
- package/build/{mcp → server}/uiBridge.js +3 -3
- package/build/serverHttp.js +5 -5
- package/build/{utils → shared}/apiStatusFeed.js +1 -1
- package/build/{config → shared}/credentialFile.js +1 -1
- package/build/{config → shared}/environment.js +6 -6
- package/build/{utils → shared}/http.js +2 -2
- package/build/{utils → shared}/localMedia.js +1 -1
- package/build/{utils → shared}/logger.js +2 -2
- package/build/{config → shared}/toolFamilies.js +3 -3
- package/build/{tools → tool-registry}/contracts.js +1 -1
- package/build/{tools → tool-registry}/defineTool.js +3 -3
- package/build/{tools → tool-registry}/index.js +2 -2
- package/build/{tools → tool-registry}/registry.js +1 -1
- package/build/{tools → tool-registry}/schemas.js +16 -1
- package/build/{tools/categories/index.js → tool-registry/toolCategories.js} +21 -21
- package/build/{tools → tool-registry}/ui/maps.js +2 -2
- package/build/{tools → tool-registry}/ui/viewModels.js +1 -1
- package/package.json +10 -15
- package/build/api/ebaySellerApi.js +0 -175
- package/build/schemas/marketing/marketing.js +0 -13
- package/build/scripts/buildMcpApps.js +0 -49
- package/build/scripts/devSync.js +0 -432
- package/build/scripts/specCoverage.js +0 -78
- package/build/scripts/specDownload.js +0 -42
- package/build/scripts/specRefs.js +0 -54
- package/build/scripts/specSources.js +0 -142
- package/build/scripts/specTypeNames.js +0 -23
- /package/build/{scripts → cli}/setupShared.js +0 -0
- /package/build/{skills → cli/skills}/markers.js +0 -0
- /package/build/{skills → cli/skills}/targets.js +0 -0
- /package/build/{skills → cli/skills}/types.js +0 -0
- /package/build/{schemas/analytics/analytics.js → ebay-apis/analytics/analyticsSchemas.js} +0 -0
- /package/build/{schemas/other/browse.js → ebay-apis/browse/browseSchemas.js} +0 -0
- /package/build/{api/other → ebay-apis/browse}/browseTypes.js +0 -0
- /package/build/{utils/communication/feedback.js → ebay-apis/communication/feedbackHelpers.js} +0 -0
- /package/build/{utils/communication/message.js → ebay-apis/communication/messageHelpers.js} +0 -0
- /package/build/{utils/communication/negotiation.js → ebay-apis/communication/negotiationHelpers.js} +0 -0
- /package/build/{schemas/developer/developer.js → ebay-apis/developer/developerSchemas.js} +0 -0
- /package/build/{schemas/inventory-management/feed.js → ebay-apis/feed/feedSchemas.js} +0 -0
- /package/build/{schemas/account-management/finances.js → ebay-apis/finances/financesSchemas.js} +0 -0
- /package/build/{api/order-management → ebay-apis/fulfillment}/orderIssueHelpers.js +0 -0
- /package/build/{api/listing-management/shared.js → ebay-apis/inventory/inventorySharedApi.js} +0 -0
- /package/build/{schemas/inventory-management/mediaDocuments.js → ebay-apis/inventory/mediaDocumentsSchemas.js} +0 -0
- /package/build/{schemas/inventory-management/media.js → ebay-apis/inventory/mediaSchemas.js} +0 -0
- /package/build/{schemas/marketing/common.js → ebay-apis/marketing/marketingCommonSchemas.js} +0 -0
- /package/build/{api/marketing-and-promotions/shared.js → ebay-apis/marketing/marketingSharedApi.js} +0 -0
- /package/build/{schemas/metadata/metadata.js → ebay-apis/metadata/metadataSchemas.js} +0 -0
- /package/build/{schemas/other/otherApis.js → ebay-apis/other/otherApisSchemas.js} +0 -0
- /package/build/{schemas/inventory-management/stores.js → ebay-apis/stores/storesSchemas.js} +0 -0
- /package/build/{schemas/taxonomy/categoryTree.js → ebay-apis/taxonomy/categoryTreeSchemas.js} +0 -0
- /package/build/{schemas/taxonomy/charity.js → ebay-apis/taxonomy/charitySchemas.js} +0 -0
- /package/build/{schemas/taxonomy/taxonomy.js → ebay-apis/taxonomy/taxonomySchemas.js} +0 -0
- /package/build/{api/shared → ebay-client}/auctionPricing.js +0 -0
- /package/build/{api/client → ebay-client}/ebayClientRequestError.js +0 -0
- /package/build/{api/client → ebay-client}/rateLimitTracker.js +0 -0
- /package/build/{api/client → ebay-client}/signEbayRequest.js +0 -0
- /package/build/{api/client → ebay-client}/tradingApiFailure.js +0 -0
- /package/build/{utils → shared}/cliOutput.js +0 -0
- /package/build/{utils → shared}/cliUi.js +0 -0
- /package/build/{utils → shared}/dateConverter.js +0 -0
- /package/build/{types → shared}/ebay.js +0 -0
- /package/build/{types → shared}/ebayEnums.js +0 -0
- /package/build/{utils → shared}/entryModule.js +0 -0
- /package/build/{utils → shared}/envFile.js +0 -0
- /package/build/{utils → shared}/envParser.js +0 -0
- /package/build/{utils → shared}/errors.js +0 -0
- /package/build/{types → shared}/index.js +0 -0
- /package/build/{utils → shared}/llmClientDetector.js +0 -0
- /package/build/{utils → shared}/localFeedFiles.js +0 -0
- /package/build/{utils → shared}/logRedaction.js +0 -0
- /package/build/{config → shared}/mediaAccess.js +0 -0
- /package/build/{config → shared}/oauthScopes.js +0 -0
- /package/build/{utils → shared}/objects.js +0 -0
- /package/build/{utils → shared}/schemaHelpers.js +0 -0
- /package/build/{utils → shared}/tokenUtils.js +0 -0
- /package/build/{utils → shared}/typeGuards.js +0 -0
- /package/build/{utils → shared}/version.js +0 -0
- /package/build/{utils → shared}/zodIssues.js +0 -0
- /package/build/{tools → tool-registry}/fileResult.js +0 -0
- /package/build/{tools → tool-registry}/types.js +0 -0
- /package/build/{tools → tool-registry}/ui/archetypes.js +0 -0
- /package/build/{tools → tool-registry}/ui/mapHelpers.js +0 -0
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
* Tool-family contract for the `EBAY_MCP_TOOLS` env var.
|
|
3
3
|
*
|
|
4
4
|
* This module is deliberately free of any import from the tool tree
|
|
5
|
-
* (`@/
|
|
6
|
-
* imported by tool handlers (e.g. `
|
|
5
|
+
* (`@/tool-registry/*`). `shared/environment.ts` validates `EBAY_MCP_TOOLS` and is itself
|
|
6
|
+
* imported by tool handlers (e.g. `auth/tokenManagementTools.ts`), so
|
|
7
7
|
* pulling the registry in here would create an import cycle. The heavier pieces
|
|
8
8
|
* that genuinely need the registry — the discovery catalogue and the meta-tools —
|
|
9
|
-
* live in `@/
|
|
9
|
+
* live in `@/server/toolGating`, which imports these primitives.
|
|
10
10
|
*
|
|
11
11
|
* The family keys below must stay in lock-step with `toolCategories`; a unit test
|
|
12
12
|
* asserts the two agree so adding a category without updating this list fails CI.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { uiArchetypes } from '../
|
|
2
|
-
import { formatZodIssues } from '../
|
|
1
|
+
import { uiArchetypes } from '../tool-registry/ui/archetypes.js';
|
|
2
|
+
import { formatZodIssues } from '../shared/zodIssues.js';
|
|
3
3
|
import { Data } from 'effect';
|
|
4
4
|
import { z } from 'zod';
|
|
5
5
|
/** Tagged failure thrown when tool arguments do not match the tool's input schema. */
|
|
@@ -90,7 +90,7 @@ export const defineTool = (spec) => {
|
|
|
90
90
|
* Use this for tools whose handler performs its own validation against a
|
|
91
91
|
* dedicated schema, and whose advertised `inputSchema` intentionally differs
|
|
92
92
|
* from that internal schema. The communication tools are the motivating case:
|
|
93
|
-
* each handler re-parses its arguments with a `@/
|
|
93
|
+
* each handler re-parses its arguments with a `@/ebay-apis/communication` schema
|
|
94
94
|
* (the real call contract), while the advertised input schema describes a
|
|
95
95
|
* different, client-facing shape. Re-parsing against the advertised schema here
|
|
96
96
|
* would strip or reject fields the handler's own schema needs.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/** Public tool contract helpers exported by the tools module. */
|
|
2
|
-
export { getToolContracts, validateToolContracts } from '../
|
|
2
|
+
export { getToolContracts, validateToolContracts, } from '../tool-registry/contracts.js';
|
|
3
3
|
/** Public registry helpers exported by the tools module. */
|
|
4
|
-
export { executeTool, getToolDefinitions, getToolEntries, getToolHandler, validateToolRegistry, } from '../
|
|
4
|
+
export { executeTool, getToolDefinitions, getToolEntries, getToolHandler, validateToolRegistry, } from '../tool-registry/registry.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { registeredEntries } from '../
|
|
1
|
+
import { registeredEntries } from '../tool-registry/toolCategories.js';
|
|
2
2
|
import { Data, Effect } from 'effect';
|
|
3
3
|
/** Tagged failure returned when the tool registry cannot resolve a runnable tool. */
|
|
4
4
|
export class ToolRegistryError extends Data.TaggedError('ToolRegistryError') {
|
|
@@ -1,5 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared Zod primitives reused across eBay API families.
|
|
3
|
+
*
|
|
4
|
+
* Endpoint input schemas live next to their API in `src/ebay-apis/<family>/<name>Schemas.ts`.
|
|
5
|
+
* Each one is the single source of truth for the JSON Schema MCP clients see, the runtime
|
|
6
|
+
* validation in `defineTool` and `decodeEndpointInputEffect`, and the handler argument
|
|
7
|
+
* types (`z.infer`). Generated eBay DTOs live in `src/ebay-openapi-types/` (regenerate with
|
|
8
|
+
* `pnpm sync`, never hand-edit).
|
|
9
|
+
*
|
|
10
|
+
* Writing a schema:
|
|
11
|
+
* - Describe every field with `.describe()`; the text is what the AI client reads.
|
|
12
|
+
* - Derive related schemas (`.extend`, `.pick`) instead of duplicating fields.
|
|
13
|
+
* - Register the tool with `inputSchema: someInputSchema.shape` in
|
|
14
|
+
* `src/ebay-apis/<family>/<name>Tools.ts`.
|
|
15
|
+
*/
|
|
1
16
|
import { z } from 'zod';
|
|
2
|
-
import { TimeDurationUnit, RegionType, ShippingCostType, ShippingOptionType, DepositType, RefundMethod, ReturnMethod, ReturnShippingCostPayer, Condition, LengthUnit, WeightUnit, PricingVisibility, FormatType, ListingDuration, LocationType, MerchantLocationStatus, DayOfWeek, ReasonForRefund, FundingModel, MessageReferenceType, FeedbackRating, ReportedItemType, } from '../
|
|
17
|
+
import { TimeDurationUnit, RegionType, ShippingCostType, ShippingOptionType, DepositType, RefundMethod, ReturnMethod, ReturnShippingCostPayer, Condition, LengthUnit, WeightUnit, PricingVisibility, FormatType, ListingDuration, LocationType, MerchantLocationStatus, DayOfWeek, ReasonForRefund, FundingModel, MessageReferenceType, FeedbackRating, ReportedItemType, } from '../shared/ebayEnums.js';
|
|
3
18
|
/**
|
|
4
19
|
* Reusable Zod schemas for eBay API tool input validation
|
|
5
20
|
*
|
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
import { connectorEntries } from '
|
|
2
|
-
import { tokenManagementEntries } from '
|
|
3
|
-
import { accountEntries } from '
|
|
4
|
-
import { accountV2Entries } from '
|
|
5
|
-
import { financesEntries } from '
|
|
6
|
-
import { inventoryEntries } from '
|
|
7
|
-
import { mediaEntries } from '
|
|
8
|
-
import { feedEntries } from '
|
|
9
|
-
import { storesEntries } from '
|
|
10
|
-
import { fulfillmentEntries } from '
|
|
11
|
-
import { logisticsEntries } from '
|
|
12
|
-
import { marketingEntries } from '
|
|
13
|
-
import { analyticsEntries } from '
|
|
14
|
-
import { metadataEntries } from '
|
|
15
|
-
import { taxonomyEntries } from '
|
|
16
|
-
import { charityEntries } from '
|
|
17
|
-
import { communicationEntries } from '
|
|
18
|
-
import { browseEntries } from '
|
|
19
|
-
import { otherEntries } from '
|
|
20
|
-
import { developerEntries } from '
|
|
21
|
-
import { tradingEntries } from '
|
|
1
|
+
import { connectorEntries } from '../server/connectorTools.js';
|
|
2
|
+
import { tokenManagementEntries } from '../auth/tokenManagementTools.js';
|
|
3
|
+
import { accountEntries } from '../ebay-apis/account/accountTools.js';
|
|
4
|
+
import { accountV2Entries } from '../ebay-apis/account/accountV2Tools.js';
|
|
5
|
+
import { financesEntries } from '../ebay-apis/finances/financesTools.js';
|
|
6
|
+
import { inventoryEntries } from '../ebay-apis/inventory/inventoryTools.js';
|
|
7
|
+
import { mediaEntries } from '../ebay-apis/inventory/mediaTools.js';
|
|
8
|
+
import { feedEntries } from '../ebay-apis/feed/feedTools.js';
|
|
9
|
+
import { storesEntries } from '../ebay-apis/stores/storesTools.js';
|
|
10
|
+
import { fulfillmentEntries } from '../ebay-apis/fulfillment/fulfillmentTools.js';
|
|
11
|
+
import { logisticsEntries } from '../ebay-apis/logistics/logisticsTools.js';
|
|
12
|
+
import { marketingEntries } from '../ebay-apis/marketing/marketingTools.js';
|
|
13
|
+
import { analyticsEntries } from '../ebay-apis/analytics/analyticsTools.js';
|
|
14
|
+
import { metadataEntries } from '../ebay-apis/metadata/metadataTools.js';
|
|
15
|
+
import { taxonomyEntries } from '../ebay-apis/taxonomy/taxonomyTools.js';
|
|
16
|
+
import { charityEntries } from '../ebay-apis/taxonomy/charityTools.js';
|
|
17
|
+
import { communicationEntries } from '../ebay-apis/communication/communicationTools.js';
|
|
18
|
+
import { browseEntries } from '../ebay-apis/browse/browseTools.js';
|
|
19
|
+
import { otherEntries } from '../ebay-apis/other/otherTools.js';
|
|
20
|
+
import { developerEntries } from '../ebay-apis/developer/developerTools.js';
|
|
21
|
+
import { tradingEntries } from '../ebay-apis/trading/tradingTools.js';
|
|
22
22
|
/**
|
|
23
23
|
* Registered tool families in registry execution order. Connector tools
|
|
24
24
|
* (`search`/`fetch`) are registered ahead of the eBay API tools, matching the
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Tool-result → {@link ViewModel} projections for the interactive MCP Apps layer.
|
|
3
3
|
*
|
|
4
4
|
* Each exported `map*` const is referenced by exactly one tool's `ui.map` in
|
|
5
|
-
* `src/
|
|
5
|
+
* `src/ebay-apis/<family>/*Tools.ts`. Keeping them here (rather than inline in the category
|
|
6
6
|
* files) does two things: it keeps the tool definitions terse, and it lets the
|
|
7
7
|
* unit tests import every projection directly. Drift protection still holds — the
|
|
8
8
|
* `defineTool` call site type-checks each function against its handler's awaited
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
* returns; every output is the archetype view model the React app in `mcp-apps/`
|
|
13
13
|
* renders. Formatting lives in `./mapHelpers.js` so these stay declarative.
|
|
14
14
|
*/
|
|
15
|
-
import { formatAmount, humanizeStatus, statusTone, toLabel, toNumber, truncate, } from '../../
|
|
15
|
+
import { formatAmount, humanizeStatus, statusTone, toLabel, toNumber, truncate, } from '../../tool-registry/ui/mapHelpers.js';
|
|
16
16
|
/**
|
|
17
17
|
* Builds a table's contextual footnote from how many rows are shown versus the
|
|
18
18
|
* server's reported total, e.g. `"Showing 25 of 240"`. Returns `undefined` when
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* These shapes are the **single source of truth** shared across the two build
|
|
5
5
|
* graphs that make up the feature:
|
|
6
6
|
*
|
|
7
|
-
* - the **server** (`src/
|
|
7
|
+
* - the **server** (`src/server/runtime.ts` + each tool's `ui.map`) produces a
|
|
8
8
|
* `ViewModel` and ships it as the tool result's `structuredContent`, and
|
|
9
9
|
* - the **React apps** in `mcp-apps/` consume that same `structuredContent` to render.
|
|
10
10
|
*
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ebay-mcp",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.6",
|
|
4
4
|
"description": "Model Context Protocol (MCP) server that exposes 100% of the eBay Sell, Commerce and Developer APIs it tracks (379 tools across 356 endpoints) to AI assistants like Claude, Cursor, and Cline, covering inventory, order fulfillment, marketing, analytics, and developer tools with OAuth authentication and refresh-token support.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "build/index.js",
|
|
@@ -26,19 +26,14 @@
|
|
|
26
26
|
"files": [
|
|
27
27
|
"build/index.js",
|
|
28
28
|
"build/serverHttp.js",
|
|
29
|
-
"build/api/**/*.js",
|
|
30
29
|
"build/auth/**/*.js",
|
|
31
|
-
"build/
|
|
32
|
-
"build/
|
|
33
|
-
"build/
|
|
34
|
-
"build/
|
|
35
|
-
"build/
|
|
36
|
-
"build/
|
|
37
|
-
"build/utils/**/*.js",
|
|
30
|
+
"build/cli/**/*.js",
|
|
31
|
+
"build/ebay-apis/**/*.js",
|
|
32
|
+
"build/ebay-client/**/*.js",
|
|
33
|
+
"build/server/**/*.js",
|
|
34
|
+
"build/shared/**/*.js",
|
|
35
|
+
"build/tool-registry/**/*.js",
|
|
38
36
|
"build/ui/*.html",
|
|
39
|
-
"build/types/index.js",
|
|
40
|
-
"build/types/ebay.js",
|
|
41
|
-
"build/types/ebayEnums.js",
|
|
42
37
|
"build/index.d.ts",
|
|
43
38
|
"build/serverHttp.d.ts",
|
|
44
39
|
"assets/icons/*.png",
|
|
@@ -107,10 +102,10 @@
|
|
|
107
102
|
"test": "vitest run",
|
|
108
103
|
"test:coverage": "vitest run --coverage",
|
|
109
104
|
"test:integration": "vitest run --config vitest.integration.config.cts",
|
|
110
|
-
"setup": "node build/
|
|
111
|
-
"skills": "node build/
|
|
105
|
+
"setup": "node build/cli/setup.js",
|
|
106
|
+
"skills": "node build/cli/skills.js",
|
|
112
107
|
"sync": "tsx src/scripts/devSync.ts",
|
|
113
|
-
"diagnose": "node build/
|
|
108
|
+
"diagnose": "node build/cli/diagnostics.js",
|
|
114
109
|
"typecheck": "tsc --noEmit --incremental --tsBuildInfoFile node_modules/.cache/tsc/src.tsbuildinfo",
|
|
115
110
|
"typecheck:mcp-apps": "tsc -p src/mcp-apps/tsconfig.json --noEmit",
|
|
116
111
|
"check": "turbo run lint typecheck typecheck:mcp-apps test build --output-logs=errors-only",
|
|
@@ -1,175 +0,0 @@
|
|
|
1
|
-
import { AccountApi } from '../api/account-management/account.js';
|
|
2
|
-
import { AccountV2Api } from '../api/account-management/accountV2.js';
|
|
3
|
-
import { FinancesApi } from '../api/account-management/finances.js';
|
|
4
|
-
import { AnalyticsApi } from '../api/analytics-and-report/analytics.js';
|
|
5
|
-
import { EbayApiClient } from '../api/client/ebayApiClient.js';
|
|
6
|
-
import { FeedbackApi } from '../api/communication/feedback.js';
|
|
7
|
-
import { MessageApi } from '../api/communication/message.js';
|
|
8
|
-
import { NegotiationApi } from '../api/communication/negotiation.js';
|
|
9
|
-
import { NotificationApi } from '../api/communication/notification.js';
|
|
10
|
-
import { DeveloperApi } from '../api/developer/developer.js';
|
|
11
|
-
import { FeedApi } from '../api/listing-management/feed.js';
|
|
12
|
-
import { InventoryApi } from '../api/listing-management/inventory.js';
|
|
13
|
-
import { MediaApi } from '../api/listing-management/media.js';
|
|
14
|
-
import { StoresApi } from '../api/listing-management/stores.js';
|
|
15
|
-
import { CharityApi } from '../api/listing-metadata/charity.js';
|
|
16
|
-
import { MetadataApi } from '../api/listing-metadata/metadata.js';
|
|
17
|
-
import { TaxonomyApi } from '../api/listing-metadata/taxonomy.js';
|
|
18
|
-
import { MarketingApi } from '../api/marketing-and-promotions/marketing.js';
|
|
19
|
-
import { RecommendationApi } from '../api/marketing-and-promotions/recommendation.js';
|
|
20
|
-
import { DisputeApi } from '../api/order-management/dispute.js';
|
|
21
|
-
import { FulfillmentApi } from '../api/order-management/fulfillment.js';
|
|
22
|
-
import { LogisticsApi } from '../api/order-management/logistics.js';
|
|
23
|
-
import { EDeliveryApi } from '../api/other/edelivery.js';
|
|
24
|
-
import { BrowseApi } from '../api/other/browse.js';
|
|
25
|
-
import { IdentityApi } from '../api/other/identity.js';
|
|
26
|
-
import { TranslationApi } from '../api/other/translation.js';
|
|
27
|
-
import { VeroApi } from '../api/other/vero.js';
|
|
28
|
-
import { TradingApiClient } from '../api/client/tradingApiClient.js';
|
|
29
|
-
import { TradingApi } from '../api/trading/trading.js';
|
|
30
|
-
/**
|
|
31
|
-
* Main API facade providing access to all eBay APIs
|
|
32
|
-
*/
|
|
33
|
-
export class EbaySellerApi {
|
|
34
|
-
client;
|
|
35
|
-
config;
|
|
36
|
-
// API categories
|
|
37
|
-
account;
|
|
38
|
-
accountV2;
|
|
39
|
-
finances;
|
|
40
|
-
inventory;
|
|
41
|
-
media;
|
|
42
|
-
feed;
|
|
43
|
-
stores;
|
|
44
|
-
fulfillment;
|
|
45
|
-
logistics;
|
|
46
|
-
dispute;
|
|
47
|
-
marketing;
|
|
48
|
-
recommendation;
|
|
49
|
-
analytics;
|
|
50
|
-
metadata;
|
|
51
|
-
taxonomy;
|
|
52
|
-
charity;
|
|
53
|
-
negotiation;
|
|
54
|
-
message;
|
|
55
|
-
notification;
|
|
56
|
-
feedback;
|
|
57
|
-
identity;
|
|
58
|
-
vero;
|
|
59
|
-
translation;
|
|
60
|
-
edelivery;
|
|
61
|
-
browse;
|
|
62
|
-
developer;
|
|
63
|
-
trading;
|
|
64
|
-
constructor(config) {
|
|
65
|
-
this.config = config;
|
|
66
|
-
this.client = new EbayApiClient(config);
|
|
67
|
-
// Initialize API category handlers
|
|
68
|
-
this.account = new AccountApi(this.client);
|
|
69
|
-
this.accountV2 = new AccountV2Api(this.client);
|
|
70
|
-
this.finances = new FinancesApi(this.client);
|
|
71
|
-
this.inventory = new InventoryApi(this.client);
|
|
72
|
-
this.media = new MediaApi(this.client, this.inventory);
|
|
73
|
-
this.feed = new FeedApi(this.client);
|
|
74
|
-
this.stores = new StoresApi(this.client);
|
|
75
|
-
this.fulfillment = new FulfillmentApi(this.client);
|
|
76
|
-
this.logistics = new LogisticsApi(this.client);
|
|
77
|
-
this.dispute = new DisputeApi(this.client);
|
|
78
|
-
this.marketing = new MarketingApi(this.client);
|
|
79
|
-
this.recommendation = new RecommendationApi(this.client);
|
|
80
|
-
this.analytics = new AnalyticsApi(this.client);
|
|
81
|
-
this.metadata = new MetadataApi(this.client);
|
|
82
|
-
this.taxonomy = new TaxonomyApi(this.client);
|
|
83
|
-
this.charity = new CharityApi(this.client);
|
|
84
|
-
this.negotiation = new NegotiationApi(this.client);
|
|
85
|
-
this.message = new MessageApi(this.client);
|
|
86
|
-
this.notification = new NotificationApi(this.client);
|
|
87
|
-
this.feedback = new FeedbackApi(this.client);
|
|
88
|
-
this.identity = new IdentityApi(this.client);
|
|
89
|
-
this.vero = new VeroApi(this.client);
|
|
90
|
-
this.translation = new TranslationApi(this.client);
|
|
91
|
-
this.edelivery = new EDeliveryApi(this.client);
|
|
92
|
-
this.browse = new BrowseApi(this.client);
|
|
93
|
-
this.developer = new DeveloperApi(this.client);
|
|
94
|
-
const tradingClient = new TradingApiClient(this.client);
|
|
95
|
-
this.trading = new TradingApi(tradingClient);
|
|
96
|
-
}
|
|
97
|
-
/**
|
|
98
|
-
* Initialize the API (load tokens from storage)
|
|
99
|
-
*/
|
|
100
|
-
initialize = () => this.client.initialize();
|
|
101
|
-
/**
|
|
102
|
-
* Check if the API client is authenticated
|
|
103
|
-
*/
|
|
104
|
-
isAuthenticated() {
|
|
105
|
-
return this.client.isAuthenticated();
|
|
106
|
-
}
|
|
107
|
-
/**
|
|
108
|
-
* Check if user tokens are available
|
|
109
|
-
*/
|
|
110
|
-
hasUserTokens() {
|
|
111
|
-
return this.client.hasUserTokens();
|
|
112
|
-
}
|
|
113
|
-
/**
|
|
114
|
-
* Set user access and refresh tokens
|
|
115
|
-
*/
|
|
116
|
-
setUserTokens = (accessToken, refreshToken, accessTokenExpiry, refreshTokenExpiry) => this.client.setUserTokens(accessToken, refreshToken, accessTokenExpiry, refreshTokenExpiry);
|
|
117
|
-
/**
|
|
118
|
-
* Get OAuth client for advanced operations
|
|
119
|
-
*/
|
|
120
|
-
getAuthClient() {
|
|
121
|
-
return this.client;
|
|
122
|
-
}
|
|
123
|
-
/**
|
|
124
|
-
* Returns the validated runtime configuration used to construct this API facade.
|
|
125
|
-
*
|
|
126
|
-
* @returns eBay API runtime configuration with credentials, environment, and proxy flags.
|
|
127
|
-
*
|
|
128
|
-
* @example
|
|
129
|
-
* ```ts
|
|
130
|
-
* const environment = api.getConfig().environment;
|
|
131
|
-
* ```
|
|
132
|
-
*/
|
|
133
|
-
getConfig() {
|
|
134
|
-
return this.config;
|
|
135
|
-
}
|
|
136
|
-
/**
|
|
137
|
-
* Get token information for debugging
|
|
138
|
-
*/
|
|
139
|
-
getTokenInfo() {
|
|
140
|
-
return this.client.getTokenInfo();
|
|
141
|
-
}
|
|
142
|
-
}
|
|
143
|
-
export * from '../api/account-management/account.js';
|
|
144
|
-
export * from '../api/account-management/accountV2.js';
|
|
145
|
-
export * from '../api/account-management/finances.js';
|
|
146
|
-
export * from '../api/analytics-and-report/analytics.js';
|
|
147
|
-
export * from '../api/client/ebayApiClient.js';
|
|
148
|
-
export * from '../api/communication/feedback.js';
|
|
149
|
-
export * from '../api/communication/message.js';
|
|
150
|
-
export * from '../api/communication/negotiation.js';
|
|
151
|
-
export * from '../api/communication/notification.js';
|
|
152
|
-
export * from '../api/listing-management/feed.js';
|
|
153
|
-
export * from '../api/listing-management/inventory.js';
|
|
154
|
-
export * from '../api/listing-management/media.js';
|
|
155
|
-
export * from '../api/listing-management/mediaAttach.js';
|
|
156
|
-
export * from '../api/listing-management/stores.js';
|
|
157
|
-
export * from '../api/listing-metadata/charity.js';
|
|
158
|
-
export * from '../api/listing-metadata/metadata.js';
|
|
159
|
-
export * from '../api/listing-metadata/taxonomy.js';
|
|
160
|
-
export * from '../api/marketing-and-promotions/marketing.js';
|
|
161
|
-
export * from '../api/marketing-and-promotions/recommendation.js';
|
|
162
|
-
export * from '../api/order-management/dispute.js';
|
|
163
|
-
export * from '../api/order-management/fulfillment.js';
|
|
164
|
-
export * from '../api/order-management/logistics.js';
|
|
165
|
-
export * from '../api/other/edelivery.js';
|
|
166
|
-
export { BrowseApi } from '../api/other/browse.js';
|
|
167
|
-
export { buildBrowseFilter, requireNoPriceFilterConflict } from '../api/other/browseFilter.js';
|
|
168
|
-
export { mapItemDetailsResponse, mapItemSummary, mapSearchActiveItemsResponse, } from '../api/other/browseMappers.js';
|
|
169
|
-
export { BROWSE_SORT_VALUES, } from '../api/other/browseTypes.js';
|
|
170
|
-
export * from '../api/other/identity.js';
|
|
171
|
-
export * from '../api/other/translation.js';
|
|
172
|
-
export * from '../api/other/vero.js';
|
|
173
|
-
export * from '../api/developer/developer.js';
|
|
174
|
-
export * from '../api/trading/trading.js';
|
|
175
|
-
export * from '../api/client/tradingApiClient.js';
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Marketing API Schemas
|
|
3
|
-
*
|
|
4
|
-
* Barrel re-export of subdomain schema modules. Import from here for stable paths:
|
|
5
|
-
* `@/schemas/marketing/marketing.js`
|
|
6
|
-
*
|
|
7
|
-
* Slices: common, campaigns, ads, reports, promotions.
|
|
8
|
-
*/
|
|
9
|
-
export * from './common.js';
|
|
10
|
-
export * from './campaigns.js';
|
|
11
|
-
export * from './ads.js';
|
|
12
|
-
export * from './reports.js';
|
|
13
|
-
export * from './promotions.js';
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Builds the interactive MCP Apps views in `mcp-apps/` into self-contained HTML
|
|
3
|
-
* files under `build/ui/`.
|
|
4
|
-
*
|
|
5
|
-
* Why a script rather than a single `vite.config.ts`: `vite-plugin-singlefile`
|
|
6
|
-
* inlines all dynamic imports, which Rollup only permits with a single input.
|
|
7
|
-
* The archetypes are therefore built one at a time (each its own
|
|
8
|
-
* single-page build) into a shared output directory — the first pass clears it,
|
|
9
|
-
* the rest append. The result is exactly what `src/mcp/uiBridge.ts` expects:
|
|
10
|
-
* `build/ui/{table,card,chart,stat}.html`, each with its JS and CSS inlined so the
|
|
11
|
-
* server can serve it verbatim as a `ui://` resource with no sibling requests.
|
|
12
|
-
*
|
|
13
|
-
* Run via `pnpm build:mcp-apps` (also chained into `pnpm build`).
|
|
14
|
-
*/
|
|
15
|
-
import path from 'node:path';
|
|
16
|
-
import { fileURLToPath } from 'node:url';
|
|
17
|
-
import { build } from 'vite';
|
|
18
|
-
import { viteSingleFile } from 'vite-plugin-singlefile';
|
|
19
|
-
import { uiArchetypes } from '../tools/ui/archetypes.js';
|
|
20
|
-
import { serverLogger } from '../utils/logger.js';
|
|
21
|
-
const scriptsDir = path.dirname(fileURLToPath(import.meta.url));
|
|
22
|
-
const repoRoot = path.resolve(scriptsDir, '../..');
|
|
23
|
-
const mcpAppsDir = path.resolve(repoRoot, 'src', 'mcp-apps');
|
|
24
|
-
const outDir = path.resolve(repoRoot, 'build', 'ui');
|
|
25
|
-
/** Vite config for a single archetype's single-page, fully-inlined build. */
|
|
26
|
-
function configFor(archetype, clean) {
|
|
27
|
-
return {
|
|
28
|
-
root: mcpAppsDir,
|
|
29
|
-
configFile: false,
|
|
30
|
-
logLevel: 'warn',
|
|
31
|
-
plugins: [viteSingleFile()],
|
|
32
|
-
esbuild: { jsx: 'automatic', jsxImportSource: 'react' },
|
|
33
|
-
resolve: {
|
|
34
|
-
alias: {
|
|
35
|
-
'@': path.resolve(repoRoot, 'src'),
|
|
36
|
-
},
|
|
37
|
-
},
|
|
38
|
-
build: {
|
|
39
|
-
outDir,
|
|
40
|
-
emptyOutDir: clean,
|
|
41
|
-
rollupOptions: { input: path.resolve(mcpAppsDir, uiArchetypes[archetype].htmlFile) },
|
|
42
|
-
},
|
|
43
|
-
};
|
|
44
|
-
}
|
|
45
|
-
const archetypes = Object.keys(uiArchetypes);
|
|
46
|
-
for (const [index, archetype] of archetypes.entries()) {
|
|
47
|
-
await build(configFor(archetype, index === 0));
|
|
48
|
-
serverLogger.info(`Built UI view "${uiArchetypes[archetype].htmlFile}"`);
|
|
49
|
-
}
|