@trustrails/mcp-server 1.0.23 → 1.0.25
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 +46 -9
- package/dist/index.js +49 -14
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -67,7 +67,7 @@ Just ask Claude naturally — it will decompose your request into the right quer
|
|
|
67
67
|
Claude will search across multiple UK retailers and show you:
|
|
68
68
|
- Real-time prices & availability
|
|
69
69
|
- Direct purchase links
|
|
70
|
-
- Then call `get_product` for
|
|
70
|
+
- Then call `get_product` for a product's attributes, description and every offer when you need details
|
|
71
71
|
|
|
72
72
|
---
|
|
73
73
|
|
|
@@ -75,28 +75,59 @@ Claude will search across multiple UK retailers and show you:
|
|
|
75
75
|
|
|
76
76
|
### `search_products`
|
|
77
77
|
|
|
78
|
-
Search 26,000+ UK electronics products. Returns summary data (title, price, availability, category). For
|
|
78
|
+
Search 26,000+ UK electronics products. Returns summary data (title, price, availability, category). For a product's structured `attributes`, the retailer's description and every offer, use `get_product`.
|
|
79
79
|
|
|
80
80
|
**Parameters:**
|
|
81
|
-
- `query` (string) - Refinement terms after brand and category are extracted: model lines, series, variants, technology descriptors, or model numbers (e.g., "neo", "ultra", "oled", "WH-1000XM5"). Omit entirely if brand + category alone describe what's needed. Never put brand names, product family names, or prices here — use filters.
|
|
81
|
+
- `query` (string) - Refinement terms after brand and category are extracted: model lines, series, variants, technology descriptors, or model numbers (e.g., "neo", "ultra", "oled", "WH-1000XM5"). Omit entirely if brand + category alone describe what's needed. Never put brand names, product family names, or prices here — use filters. Query words must appear in the title, except words naming the category ("router" in Networking) and bare numbers or specs ("4070", "16GB"), which are ignored when finding products and only rank them: put a model number with its prefix ("RTX 4070", not "4070") and check each title for it.
|
|
82
82
|
- `min_price` (number, optional) - Minimum price in GBP
|
|
83
83
|
- `max_price` (number, optional) - Maximum price in GBP
|
|
84
84
|
- `brand` (string, optional) - Filter by brand, exact match (e.g., "Sony", "HP", "Apple")
|
|
85
85
|
- `category` (string, optional) - Filter by category: Laptops, Desktops, Tablets, Phones, TVs, Monitors, Headphones, Speakers, Cameras, Keyboards, Mice, Printers, Networking, Storage, Gaming, Wearables, Drones, Audio, Cables & Chargers.
|
|
86
|
+
- `constraints` (object, optional) - Hard spec requirements, checked per product against its `attributes`: `{"memory_gb":{"gte":24},"storage_gb":{"gte":1000},"screen_in":{"eq":15}}`. Operators `eq`, `gte`, `lte`; a range is `{"gte":..,"lte":..}`. Names and units: `memory_gb` (RAM, GB), `storage_gb` (GB, 1TB = 1000), `screen_in` (inches), `resolution_p` (pixels high: 4K = 2160, QHD = 1440, Full HD = 1080), `refresh_hz` (Hz), `power_w` (W), `wifi_gen` (Wi-Fi generation: 6, 6E = 6.5, 7). On every operator, storage matches within 3% (1TB = 1000–1024GB) and screen size within 0.5 inch; a whole-number screen size N also covers up to N+1 on `eq` and `lte` (`gte` is unchanged); other specs exactly. Wins over the same spec written in `query`. Always set a `category` or `brand` with it. A bad request (unknown name or operator, negative value, a combination nothing can meet such as `gte` above `lte`, or constraints with no category, brand or search words) returns an error listing the valid ones. See [Structured specs](#structured-specs).
|
|
86
87
|
- `lite` (boolean, optional) - Return trimmed product objects (reduces payload by ~80%). Always use for LLM integrations.
|
|
87
88
|
- `limit` (number, optional) - Maximum products to return (default 50, max 100)
|
|
88
|
-
- `sort` (string, optional) - Sort order: `relevance` (default), `price_asc` (cheapest first), `price_desc` (most expensive first). Use `price_asc` when comparing prices.
|
|
89
|
+
- `sort` (string, optional) - Sort order: `relevance` (default), `price_asc` (cheapest first), `price_desc` (most expensive first). Use `price_asc` when comparing prices. With constraints, matched products still come first.
|
|
89
90
|
|
|
90
|
-
**Returns:** Up to 50 products with summary data. With `lite: true`, returns only essential fields (id, title, brand, price, availability, image_url, purchase_url).
|
|
91
|
+
**Returns:** Up to 50 products with summary data. With `lite: true`, returns only essential fields (id, title, brand, price, currency, availability, image_url, purchase_url, offer_count and, with constraints, `constraint_status` and the `attributes` of the constrained names).
|
|
91
92
|
|
|
92
93
|
### `get_product`
|
|
93
94
|
|
|
94
|
-
Get full details for a single product. Returns
|
|
95
|
+
Get full details for a single product. Returns structured `attributes` (see [Structured specs](#structured-specs)), `specs.description` (the retailer's own prose, for processor, ports, graphics and anything `attributes` does not cover), stock level, delivery time, and all retailer offers with per-retailer pricing. Use after `search_products` for detailed comparison or recommendations.
|
|
95
96
|
|
|
96
97
|
**Parameters:**
|
|
97
98
|
- `product_id` (string) - The product ID from search results
|
|
98
99
|
|
|
99
|
-
**Returns:** Complete product with
|
|
100
|
+
**Returns:** Complete product with structured `attributes`, `specs` (including the retailer's `specs.description`), pricing across all retailers, and provenance information
|
|
101
|
+
|
|
102
|
+
### Structured specs
|
|
103
|
+
|
|
104
|
+
`get_product` returns `attributes`: structured specs (RAM, storage, screen size, resolution, refresh rate, power, Wi-Fi generation) read from retailer titles when the catalogue is imported, next to `specs`. Each has a `status`, and a spec nobody states is absent (unknown):
|
|
105
|
+
|
|
106
|
+
- `confirmed`: two or more retailers state the same value.
|
|
107
|
+
- `inferred`: one retailer's title states it.
|
|
108
|
+
- `conflicting`: retailers state different values. None is picked; the values are listed with their retailers, and a retailer can appear under two values (check `offers[].title`).
|
|
109
|
+
|
|
110
|
+
`specs.description` is the retailer's prose. It can describe another configuration or a maximum ("up to 32GB"), so it never overrides or fills in an attribute: a spec missing from `attributes` is unknown.
|
|
111
|
+
|
|
112
|
+
For one Galaxy S26 Ultra, where only JoyBuy states the RAM (12GB) and two retailers disagree about the storage:
|
|
113
|
+
|
|
114
|
+
```json
|
|
115
|
+
{
|
|
116
|
+
"memory_gb": { "status": "inferred", "value": 12,
|
|
117
|
+
"sources": [{ "retailer": "JoyBuy", "field": "title" }] },
|
|
118
|
+
"storage_gb": { "status": "conflicting", "values": [
|
|
119
|
+
{ "value": 256, "sources": [{ "retailer": "Laptops Direct", "field": "title" }] },
|
|
120
|
+
{ "value": 512, "sources": [{ "retailer": "JoyBuy", "field": "title" }] } ] }
|
|
121
|
+
}
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
Searches with constraints return the constraints applied, `excluded_by_constraints`, `unverified_total`, and a `constraint_status` on each product: `matched` (a retailer's title states a value that meets the constraint) or `unverified` (not known to meet it: never treat as a match, tell the user it is unconfirmed; check `attributes[name]`, where `conflicting` means retailers disagree and missing means unknown). Products whose stated value fails a constraint are left out. A lite result also carries the `status` and value of just the constrained names, without `sources`, so a 64GB laptop is told apart from a 16GB one and disagreeing from unknown.
|
|
125
|
+
|
|
126
|
+
- **Tolerance:** storage within 3% (1TB = 1000–1024GB) and screen size within 0.5 inch, on every operator. Retailers round sizes down, so a whole-number screen size N also covers up to N+1 on `eq` and `lte` (`eq 13` accepts 13.6", `lte 15` accepts 15.6", `gte` is unchanged). Other specs, memory included, are exact.
|
|
127
|
+
- **Specs in `query`:** only a spec that says what it is counts ("24GB RAM", "1TB", "512GB SSD", "144Hz", `55"`). A bare "24GB" stays a search word. Memory, storage, resolution, refresh rate, power and Wi-Fi mean at least; screen size means that size.
|
|
128
|
+
- **With only specs:** a search with no category, brand or search words is rejected rather than checking an arbitrary 2,000 products. If a requirement is ambiguous (a bare "16GB" could be RAM or storage), ask the user or search without that constraint.
|
|
129
|
+
- **`total`:** with constraints it counts the products that match every constraint, and `unverified_total` the unverified products that passed the other filters (only some may be in `products`). Without constraints `total` is every product matching the filters.
|
|
130
|
+
- **Candidate window:** constraints are checked on the first 2,000 candidates in the chosen sort order. If more exist, the response has `candidates_truncated: true`: add a `brand` or `category`, or a narrower `query`, and search again before concluding that nothing matches. If the search was already narrowed, the results may be incomplete.
|
|
100
131
|
|
|
101
132
|
---
|
|
102
133
|
|
|
@@ -126,10 +157,16 @@ Search across **26,000+ electronics products** from major UK retailers including
|
|
|
126
157
|
→ category='Monitors', max_price=200, lite=true
|
|
127
158
|
```
|
|
128
159
|
|
|
160
|
+
**Spec requirements:**
|
|
161
|
+
```
|
|
162
|
+
"A 15 inch laptop with at least 24GB RAM and 1TB storage"
|
|
163
|
+
→ category='Laptops', constraints={"memory_gb":{"gte":24},"storage_gb":{"gte":1000},"screen_in":{"eq":15}}, lite=true
|
|
164
|
+
```
|
|
165
|
+
|
|
129
166
|
**Detailed specs:**
|
|
130
167
|
```
|
|
131
|
-
"Tell me the
|
|
132
|
-
→ get_product(product_id) — returns
|
|
168
|
+
"Tell me the specs of this laptop"
|
|
169
|
+
→ get_product(product_id) — returns its structured attributes, the retailer's description and every offer
|
|
133
170
|
```
|
|
134
171
|
|
|
135
172
|
**Price range:**
|
package/dist/index.js
CHANGED
|
@@ -5,6 +5,7 @@ import { CallToolRequestSchema, ListToolsRequestSchema, } from "@modelcontextpro
|
|
|
5
5
|
// TrustRails API configuration
|
|
6
6
|
const API_KEY = process.env.TRUSTRAILS_API_KEY || "mcp-public-2026";
|
|
7
7
|
const BASE_URL = process.env.TRUSTRAILS_BASE_URL || "https://trustrails.app";
|
|
8
|
+
const CONSTRAINT_NAMES = ["memory_gb", "storage_gb", "screen_in", "resolution_p", "refresh_hz", "power_w", "wifi_gen"];
|
|
8
9
|
// Create server instance
|
|
9
10
|
const server = new Server({
|
|
10
11
|
name: "trustrails",
|
|
@@ -34,6 +35,9 @@ async function searchProducts(params) {
|
|
|
34
35
|
if (params.category) {
|
|
35
36
|
searchParams.append("category", params.category);
|
|
36
37
|
}
|
|
38
|
+
if (params.constraints && Object.keys(params.constraints).length > 0) {
|
|
39
|
+
searchParams.append("constraints", JSON.stringify(params.constraints));
|
|
40
|
+
}
|
|
37
41
|
if (params.lite) {
|
|
38
42
|
searchParams.append("lite", "true");
|
|
39
43
|
}
|
|
@@ -50,6 +54,12 @@ async function searchProducts(params) {
|
|
|
50
54
|
},
|
|
51
55
|
});
|
|
52
56
|
if (!response.ok) {
|
|
57
|
+
// A bad constraints argument comes back as 400 {error}
|
|
58
|
+
if (response.status === 400) {
|
|
59
|
+
const body = await response.json().catch(() => null);
|
|
60
|
+
if (body?.error)
|
|
61
|
+
throw new Error(`Search failed: ${body.error}`);
|
|
62
|
+
}
|
|
53
63
|
throw new Error(`Search failed: ${response.statusText}`);
|
|
54
64
|
}
|
|
55
65
|
return await response.json();
|
|
@@ -80,26 +90,34 @@ server.setRequestHandler(ListToolsRequestSchema, async () => {
|
|
|
80
90
|
name: "search_products",
|
|
81
91
|
description: "Search 26,000+ deduplicated UK electronics products across multiple retailers with price comparison. " +
|
|
82
92
|
"Returns summary data: title, brand, price, availability, category, purchase link, and offer_count. " +
|
|
83
|
-
"When offer_count > 1, the product is available from multiple retailers — call get_product to see all offers. " +
|
|
84
|
-
"
|
|
85
|
-
"
|
|
86
|
-
"Wearables, Printers, Networking, Storage, Audio, Drones, Cables & Chargers. " +
|
|
93
|
+
"When offer_count > 1, the product is available from multiple retailers — call get_product for the 1-3 products you will recommend, not for every result, to see all offers. " +
|
|
94
|
+
"Searches that pass constraints add constraint_status and the constrained attributes; for every attribute, the retailer's description and all offers, call get_product with the product ID. " +
|
|
95
|
+
"Only compare prices and claim savings between offers of the same configuration: if any attribute is `conflicting`, check offers[].title first and never claim a saving between different sizes or configurations. " +
|
|
87
96
|
"All prices in GBP. " +
|
|
88
97
|
"IMPORTANT RULES: " +
|
|
89
|
-
"1) Decompose the user's request: extract brand → brand filter, category → category filter, price → price filters. What remains is the query. " +
|
|
98
|
+
"1) Decompose the user's request: extract brand → brand filter, category → category filter, price → price filters, RAM/storage/screen size/resolution/refresh rate/wattage/Wi-Fi generation → constraints. What remains is the query. " +
|
|
90
99
|
" Example: 'Sony headphones under £200' → brand='Sony', category='Headphones', max_price=200, query omitted. " +
|
|
91
100
|
" Example: 'MacBook Neo' → brand='Apple', category='Laptops', query='neo'. " +
|
|
92
101
|
" Example: 'Samsung QLED TV' → brand='Samsung', category='TVs', query='qled'. " +
|
|
93
102
|
" Example: 'Sony WH-1000XM5' → brand='Sony', category='Headphones', query='WH-1000XM5'. " +
|
|
94
103
|
"2) DO NOT put brand names, product family names, full product name strings, or prices in the query — use filters. DO put differentiating identifiers: model lines, series, variants, technology descriptors, and model numbers (e.g. 'neo', 'ultra', 'oled', 'qled', 'WH-1000XM5', 's25 ultra'). Any product family name uniquely associated with a brand (e.g. MacBook→Apple, Galaxy→Samsung, ThinkPad→Lenovo) is already implied by brand+category — never put it in query. BAD: query='macbook neo' → GOOD: brand='Apple', category='Laptops', query='neo'. " +
|
|
95
104
|
"3) If brand + category alone fully describe what the user wants, omit the query entirely — fewer query words gives cleaner results. " +
|
|
105
|
+
"Query words must appear in the title, except words naming the category ('router' in Networking) and bare numbers or specs ('4070', '16GB'), which are ignored when finding products and only rank them. Put a model number with its prefix ('RTX 4070', not '4070') and check each title for it. Leave out use-case words like gaming, cheap or best. " +
|
|
96
106
|
"4) Always set lite=true to reduce payload size. " +
|
|
97
|
-
"5) If 0 results, try a shorter/broader query or drop filters. " +
|
|
98
|
-
"6) Use get_product for
|
|
107
|
+
"5) If 0 results, try a shorter/broader query or drop filters (but never present a near miss as meeting a requirement). " +
|
|
108
|
+
"6) Use get_product for a product's attributes, description and every offer — do not rely on search results for detailed attributes. " +
|
|
99
109
|
"AI USAGE PROTOCOL: " +
|
|
100
110
|
"For simple browsing, search with lite=true is sufficient. " +
|
|
101
|
-
"For
|
|
102
|
-
"
|
|
111
|
+
"For specs not in `attributes` (ports, weight, battery), ALWAYS search first, then call get_product on the top 3-5 results and validate against the description before recommending; don't guess them from titles. If specs are missing, state that explicitly. " +
|
|
112
|
+
"SPEC REQUIREMENTS: put exact requirements in `constraints`, not in query, and always set `category` (and brand if known) with them: a search of only specs, with no category, brand or search words, is rejected. " +
|
|
113
|
+
"If a requirement is ambiguous (e.g. '16GB' could be RAM or storage), ask the user or search without that constraint. " +
|
|
114
|
+
"With constraints, every product has `constraint_status` per name: " +
|
|
115
|
+
"'matched' = a retailer's title states a value that meets it. 'unverified' = not known to meet it: check `attributes[name]`, where `conflicting` means retailers disagree and missing means unknown. " +
|
|
116
|
+
"Never treat 'unverified' as a match or say a product meets a requirement because it was returned: tell the user it is unconfirmed. " +
|
|
117
|
+
"Products whose stated value fails are left out (`excluded_by_constraints`). Matched results come first, also with sort='price_asc'. " +
|
|
118
|
+
"With constraints, `total` counts the products that match every constraint and `unverified_total` the unverified products that passed the other filters (only some may be in `products`). If `total` is 0, say no product is known to meet every requirement and offer the unverified ones only as unconfirmed. " +
|
|
119
|
+
"With lite=true, `attributes` holds only the constrained names, as {status, value} or {status, values} when conflicting: state the value from there, and call get_product for the rest. " +
|
|
120
|
+
"If `candidates_truncated` is true, the first 2,000 candidates in the chosen sort order were checked and more exist: add a brand or category, or a narrower query, and search again before saying nothing matches. If the search was already narrowed, tell the user the results may be incomplete. " +
|
|
103
121
|
"STOCK AVAILABILITY: When a product is availability: out_of_stock, do not recommend it as a purchase. Instead mention it as a notable alternative — especially if it offers a meaningful price advantage — and suggest the user check back. Example: 'This model is £X cheaper at [retailer] but currently out of stock — worth checking back if you're not in a rush.' Never silently omit out-of-stock results; surface them transparently.",
|
|
104
122
|
inputSchema: {
|
|
105
123
|
type: "object",
|
|
@@ -107,6 +125,7 @@ server.setRequestHandler(ListToolsRequestSchema, async () => {
|
|
|
107
125
|
query: {
|
|
108
126
|
type: "string",
|
|
109
127
|
description: "Refinement terms after brand and category are extracted. Use for model lines, series names, variants, or model numbers (e.g. 'neo', 'ultra', 'oled', 'qled', 'WH-1000XM5'). " +
|
|
128
|
+
"Query words must appear in the title, except words naming the category ('router' in Networking) and bare numbers or specs ('4070', '16GB'), which are ignored when finding products and only rank them: put a model number with its prefix ('RTX 4070', not '4070') and check each title for it. " +
|
|
110
129
|
"DO NOT include brand names, product family names, or prices — use filters. " +
|
|
111
130
|
"Omit entirely if brand + category fully describe what the user wants.",
|
|
112
131
|
},
|
|
@@ -130,13 +149,25 @@ server.setRequestHandler(ListToolsRequestSchema, async () => {
|
|
|
130
149
|
"Laptops, Desktops, Tablets, Phones, TVs, Monitors, " +
|
|
131
150
|
"Headphones, Speakers, Cameras, Keyboards, Mice, Printers, Networking, " +
|
|
132
151
|
"Storage, Gaming, Wearables, Drones, Audio, Cables & Chargers. " +
|
|
133
|
-
"NOTE: 'Smartphones' is not valid — use 'Phones'. 'Televisions' is not valid — use 'TVs'.
|
|
134
|
-
|
|
152
|
+
"NOTE: 'Smartphones' is not valid — use 'Phones'. 'Televisions' is not valid — use 'TVs'.",
|
|
153
|
+
},
|
|
154
|
+
constraints: {
|
|
155
|
+
type: "object",
|
|
156
|
+
description: "Hard spec requirements, checked per product against its attributes. Shape {name: {op: number}} with op eq, gte or lte; a range is {gte, lte}. " +
|
|
157
|
+
"On every operator, storage matches within 3% and screen size within 0.5 inch; a whole-number screen size N also covers up to N+1 on eq and lte (gte is unchanged); other specs exactly: gte 1024 accepts a 1TB drive, eq 22 a 21.5\" screen, eq 13 a 13.6\" one, lte 15 a 15.6\" one. " +
|
|
158
|
+
"Example: {\"memory_gb\": {\"gte\": 24}, \"storage_gb\": {\"gte\": 1000}, \"screen_in\": {\"eq\": 15}}. " +
|
|
159
|
+
"Names and units: memory_gb (RAM, GB), storage_gb (GB, 1TB = 1000), screen_in (inches), resolution_p (pixels high: 4K = 2160, QHD = 1440, Full HD = 1080), " +
|
|
160
|
+
"refresh_hz (Hz), power_w (W), wifi_gen (Wi-Fi generation: 6, 6E = 6.5, 7). " +
|
|
161
|
+
"A spec written in query counts only when it says what it is ('24GB RAM', '1TB', '144Hz', '55\"') and means at least, except screen size (that size); a bare '24GB' stays a search word. Explicit constraints win over it.",
|
|
162
|
+
properties: Object.fromEntries(CONSTRAINT_NAMES.map((name) => [
|
|
163
|
+
name,
|
|
164
|
+
{ type: "object", properties: { eq: { type: "number" }, gte: { type: "number" }, lte: { type: "number" } } },
|
|
165
|
+
])),
|
|
135
166
|
},
|
|
136
167
|
lite: {
|
|
137
168
|
type: "boolean",
|
|
138
169
|
description: "Return trimmed product objects with only essential fields " +
|
|
139
|
-
"(id, title, brand, price, availability, image_url, purchase_url). " +
|
|
170
|
+
"(id, title, brand, price, currency, availability, image_url, purchase_url, offer_count and, with constraints, constraint_status and the status and value of the constrained names). " +
|
|
140
171
|
"Always set to true unless the user specifically needs full product objects.",
|
|
141
172
|
},
|
|
142
173
|
limit: {
|
|
@@ -153,8 +184,12 @@ server.setRequestHandler(ListToolsRequestSchema, async () => {
|
|
|
153
184
|
{
|
|
154
185
|
name: "get_product",
|
|
155
186
|
description: "Get full details for a single product by ID. " +
|
|
156
|
-
"Returns
|
|
157
|
-
"
|
|
187
|
+
"Returns `attributes`: structured specs read from retailer titles, each name mapping to {status, value, sources}; a conflicting one has values: [{value, sources}] instead of value and sources. " +
|
|
188
|
+
"Names and units as in the search constraints argument. status: 'confirmed' = two or more retailers state the same value; 'inferred' = one retailer's title states it; " +
|
|
189
|
+
"'conflicting' = retailers state different values (none is picked, tell the user they disagree; a retailer can appear under two values, so read offers[].title to see which listing states which); a missing name = unknown. " +
|
|
190
|
+
"Also returns specs.description, the retailer's own prose: use it only for details attributes do not cover (processor, GPU, ports, weight, battery, features). " +
|
|
191
|
+
"It can describe another configuration or a maximum ('up to 32GB'), so it never overrides or fills in an attribute: if an attribute is missing or conflicting, that spec is unknown or unconfirmed, and you may mention what the description says only as 'the retailer's description mentions X, unconfirmed'. " +
|
|
192
|
+
"It also returns pricing, stock level, delivery time, and all retailer offers with per-retailer pricing. " +
|
|
158
193
|
"Accepts both canonical product IDs and original retailer offer IDs. " +
|
|
159
194
|
"Use this after search_products to get detailed specs for comparison or recommendations. " +
|
|
160
195
|
"Always call this when a user needs precise product attributes, compatibility info, side-by-side comparisons, or price comparison across retailers.",
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,MAAM,EAAE,MAAM,2CAA2C,CAAC;AACnE,OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AACjF,OAAO,EACL,qBAAqB,EACrB,sBAAsB,GACvB,MAAM,oCAAoC,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AC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;QAC5E,OAAO;YACL,OAAO,EAAE;gBACP;oBACE,IAAI,EAAE,MAAM;oBACZ,IAAI,EAAE,UAAU,YAAY,EAAE;iBAC/B;aACF;YACD,OAAO,EAAE,IAAI;SACd,CAAC;IACJ,CAAC;AACH,CAAC,CAAC,CAAC;AAEH,mBAAmB;AACnB,KAAK,UAAU,IAAI;IACjB,MAAM,SAAS,GAAG,IAAI,oBAAoB,EAAE,CAAC;IAC7C,MAAM,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;IAEhC,kDAAkD;IAClD,OAAO,CAAC,KAAK,CAAC,+BAA+B,CAAC,CAAC;IAC/C,OAAO,CAAC,KAAK,CAAC,aAAa,QAAQ,EAAE,CAAC,CAAC;IACvC,OAAO,CAAC,KAAK,CAAC,YAAY,OAAO,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,gBAAgB,EAAE,CAAC,CAAC;AACzE,CAAC;AAED,IAAI,EAAE,CAAC,KAAK,CAAC,CAAC,KAAK,EAAE,EAAE;IACrB,OAAO,CAAC,KAAK,CAAC,cAAc,EAAE,KAAK,CAAC,CAAC;IACrC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC,CAAC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@trustrails/mcp-server",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.25",
|
|
4
4
|
"mcpName": "app.trustrails/server",
|
|
5
5
|
"description": "MCP server for searching UK electronics products across multiple retailers",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"bin": {
|
|
8
|
-
"trustrails-mcp": "
|
|
8
|
+
"trustrails-mcp": "dist/index.js"
|
|
9
9
|
},
|
|
10
10
|
"files": [
|
|
11
11
|
"dist"
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"license": "MIT",
|
|
31
31
|
"repository": {
|
|
32
32
|
"type": "git",
|
|
33
|
-
"url": "https://github.com/james-webdev/trustrails-mcp-server.git"
|
|
33
|
+
"url": "git+https://github.com/james-webdev/trustrails-mcp-server.git"
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
36
|
"@modelcontextprotocol/sdk": "^1.25.1"
|