qualmcp 0.1.0 → 0.1.2
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/package.json +1 -1
- package/src/index.js +11 -5
- package/src/tools.js +3 -3
package/package.json
CHANGED
package/src/index.js
CHANGED
|
@@ -21,11 +21,17 @@ const server = new Server(
|
|
|
21
21
|
|
|
22
22
|
server.setRequestHandler(ListToolsRequestSchema, async () => {
|
|
23
23
|
return {
|
|
24
|
-
tools: Object.values(tools).map((t) =>
|
|
25
|
-
name: t.name
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
24
|
+
tools: Object.values(tools).map((t) => {
|
|
25
|
+
const schema = zodToJsonSchema(t.schema, { name: t.name });
|
|
26
|
+
return {
|
|
27
|
+
name: t.name,
|
|
28
|
+
description: t.description,
|
|
29
|
+
inputSchema: {
|
|
30
|
+
type: "object",
|
|
31
|
+
...schema
|
|
32
|
+
}
|
|
33
|
+
};
|
|
34
|
+
})
|
|
29
35
|
};
|
|
30
36
|
});
|
|
31
37
|
|
package/src/tools.js
CHANGED
|
@@ -31,7 +31,7 @@ function safeLimit(v, max = 200) {
|
|
|
31
31
|
|
|
32
32
|
export const tools = {
|
|
33
33
|
analytics_salesRank: {
|
|
34
|
-
name: '
|
|
34
|
+
name: 'analytics_salesRank',
|
|
35
35
|
description: 'Ranking of products by sales quantity/revenue across orders with flexible filters and grouping. Always returns product names when possible.',
|
|
36
36
|
schema: z.object({
|
|
37
37
|
dateFrom: z.string().datetime().optional(),
|
|
@@ -169,7 +169,7 @@ export const tools = {
|
|
|
169
169
|
},
|
|
170
170
|
|
|
171
171
|
analytics_stockHealth: {
|
|
172
|
-
name: '
|
|
172
|
+
name: 'analytics_stockHealth',
|
|
173
173
|
description: 'Stock + sales velocity and days-cover metrics per product (optionally per store). Returns product names and signals; interpretation is left to the agent.',
|
|
174
174
|
schema: z.object({
|
|
175
175
|
storeId: z.number().optional(),
|
|
@@ -314,7 +314,7 @@ export const tools = {
|
|
|
314
314
|
},
|
|
315
315
|
|
|
316
316
|
analytics_salesTimeSeries: {
|
|
317
|
-
name: '
|
|
317
|
+
name: 'analytics_salesTimeSeries',
|
|
318
318
|
description: 'Time series aggregation of orders and items sold over time buckets (day/week/month) with flexible orderScope.',
|
|
319
319
|
schema: z.object({
|
|
320
320
|
dateFrom: z.string().datetime().optional(),
|