@hypequery/mcp 0.2.0 → 0.3.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.md +8 -3
- package/dist/prompts/dataset-guide.d.ts.map +1 -1
- package/dist/prompts/dataset-guide.js +7 -3
- package/dist/server.d.ts.map +1 -1
- package/dist/server.js +7 -4
- package/dist/tools/args.d.ts +12 -12
- package/dist/tools/args.d.ts.map +1 -1
- package/dist/tools/args.js +3 -2
- package/dist/tools/introspect.d.ts +2 -2
- package/dist/tools/introspect.d.ts.map +1 -1
- package/dist/tools/introspect.js +119 -23
- package/dist/tools/list-datasets.d.ts.map +1 -1
- package/dist/tools/list-datasets.js +16 -0
- package/dist/tools/query-dataset.d.ts +1 -1
- package/dist/tools/query-dataset.js +5 -5
- package/dist/types.d.ts +38 -5
- package/dist/types.d.ts.map +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -108,6 +108,7 @@ Lists all available datasets with their descriptions.
|
|
|
108
108
|
"name": "orders",
|
|
109
109
|
"description": "Customer orders and revenue data",
|
|
110
110
|
"dimensionCount": 5,
|
|
111
|
+
"measureCount": 4,
|
|
111
112
|
"metricCount": 4
|
|
112
113
|
}
|
|
113
114
|
],
|
|
@@ -137,8 +138,12 @@ Gets the complete schema for a dataset.
|
|
|
137
138
|
"region": { "type": "string", "label": "Region" },
|
|
138
139
|
"status": { "type": "string", "label": "Order Status" }
|
|
139
140
|
},
|
|
141
|
+
"measures": {
|
|
142
|
+
"revenue": { "aggregation": "sum", "field": "amount", "label": "Revenue" },
|
|
143
|
+
"orderCount": { "aggregation": "count", "field": "id", "label": "Order Count" }
|
|
144
|
+
},
|
|
140
145
|
"metrics": {
|
|
141
|
-
"
|
|
146
|
+
"totalRevenue": { "type": "metric", "aggregation": "revenue", "label": "Total Revenue" }
|
|
142
147
|
}
|
|
143
148
|
}
|
|
144
149
|
```
|
|
@@ -184,7 +189,7 @@ Executes a pre-defined metric query.
|
|
|
184
189
|
|
|
185
190
|
### `query_dataset`
|
|
186
191
|
|
|
187
|
-
Executes an ad-hoc dataset query with custom dimensions and
|
|
192
|
+
Executes an ad-hoc dataset query with custom dimensions and measures.
|
|
188
193
|
|
|
189
194
|
**Example:**
|
|
190
195
|
```typescript
|
|
@@ -193,7 +198,7 @@ Executes an ad-hoc dataset query with custom dimensions and metrics.
|
|
|
193
198
|
"arguments": {
|
|
194
199
|
"dataset": "orders",
|
|
195
200
|
"dimensions": ["region", "status"],
|
|
196
|
-
"
|
|
201
|
+
"measures": ["revenue", "orderCount"],
|
|
197
202
|
"limit": 100
|
|
198
203
|
}
|
|
199
204
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dataset-guide.d.ts","sourceRoot":"","sources":["../../src/prompts/dataset-guide.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAEnD,wBAAgB,kBAAkB,CAAC,QAAQ,EAAE,eAAe,EAAE,WAAW,CAAC,EAAE,MAAM;;;;;;;;
|
|
1
|
+
{"version":3,"file":"dataset-guide.d.ts","sourceRoot":"","sources":["../../src/prompts/dataset-guide.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAEnD,wBAAgB,kBAAkB,CAAC,QAAQ,EAAE,eAAe,EAAE,WAAW,CAAC,EAAE,MAAM;;;;;;;;EAuIjF"}
|
|
@@ -12,12 +12,16 @@ export function datasetGuidePrompt(datasets, datasetName) {
|
|
|
12
12
|
const datasetAny = dataset;
|
|
13
13
|
// Generate dataset-specific guide
|
|
14
14
|
const dimensions = datasetAny.dimensions ? Object.keys(datasetAny.dimensions) : [];
|
|
15
|
+
const measures = datasetAny.measures ? Object.keys(datasetAny.measures) : [];
|
|
15
16
|
const metrics = datasetAny.metrics ? Object.keys(datasetAny.metrics) : [];
|
|
16
17
|
const guide = `# Querying the ${datasetName} dataset
|
|
17
18
|
|
|
18
19
|
## Available Dimensions
|
|
19
20
|
${dimensions.map((d) => `- ${d}`).join('\n')}
|
|
20
21
|
|
|
22
|
+
## Available Measures
|
|
23
|
+
${measures.map((m) => `- ${m}`).join('\n')}
|
|
24
|
+
|
|
21
25
|
## Available Metrics
|
|
22
26
|
${metrics.map((m) => `- ${m}`).join('\n')}
|
|
23
27
|
|
|
@@ -46,7 +50,7 @@ Show "${metrics[0] || 'revenue'}" by month for the last year
|
|
|
46
50
|
## Tips
|
|
47
51
|
- Use natural language to describe what you want to see
|
|
48
52
|
- The system will translate your query into the appropriate dataset query
|
|
49
|
-
- You can filter, group, and aggregate data using the available dimensions and metrics
|
|
53
|
+
- You can filter, group, and aggregate data using the available dimensions, measures, and metrics
|
|
50
54
|
`;
|
|
51
55
|
return {
|
|
52
56
|
messages: [
|
|
@@ -70,9 +74,9 @@ ${datasetList.map((name) => `- ${name}`).join('\n')}
|
|
|
70
74
|
## How to Query
|
|
71
75
|
|
|
72
76
|
1. **List datasets**: Use the \`list_datasets\` tool to see all available datasets
|
|
73
|
-
2. **Get schema**: Use the \`get_dataset_schema\` tool to see dimensions and metrics for a dataset
|
|
77
|
+
2. **Get schema**: Use the \`get_dataset_schema\` tool to see dimensions, measures, and metrics for a dataset
|
|
74
78
|
3. **Query metric**: Use the \`query_metric\` tool to execute a pre-defined metric
|
|
75
|
-
4. **Query dataset**: Use the \`query_dataset\` tool for ad-hoc queries with custom dimensions and
|
|
79
|
+
4. **Query dataset**: Use the \`query_dataset\` tool for ad-hoc queries with custom dimensions and measures
|
|
76
80
|
|
|
77
81
|
## Example Workflow
|
|
78
82
|
|
package/dist/server.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAUH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAMzD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAElD,MAAM,WAAW,eAAe;IAC9B;;OAEG;IACH,QAAQ,EAAE,eAAe,CAAC;IAE1B;;OAEG;IACH,SAAS,EAAE,aAAa,CAAC;IAEzB;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;
|
|
1
|
+
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAUH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAMzD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAElD,MAAM,WAAW,eAAe;IAC9B;;OAEG;IACH,QAAQ,EAAE,eAAe,CAAC;IAE1B;;OAEG;IACH,SAAS,EAAE,aAAa,CAAC;IAEzB;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAiCD,qBAAa,kBAAkB;IAC7B,OAAO,CAAC,MAAM,CAAS;IACvB,OAAO,CAAC,MAAM,CAAkB;gBAEpB,MAAM,EAAE,eAAe;IAoBnC,OAAO,CAAC,aAAa;IAuOrB;;OAEG;IACG,KAAK;IAQX;;OAEG;IACG,IAAI;CAGX;AAED;;GAEG;AACH,wBAAsB,eAAe,CAAC,MAAM,EAAE,eAAe,GAAG,OAAO,CAAC,kBAAkB,CAAC,CAI1F"}
|
package/dist/server.js
CHANGED
|
@@ -16,6 +16,9 @@ function isRecord(value) {
|
|
|
16
16
|
return !!value && typeof value === 'object';
|
|
17
17
|
}
|
|
18
18
|
function getTenantKey(dataset) {
|
|
19
|
+
if (!isRecord(dataset)) {
|
|
20
|
+
return undefined;
|
|
21
|
+
}
|
|
19
22
|
const config = dataset.config;
|
|
20
23
|
const configTenantKey = isRecord(config) ? config.tenantKey : undefined;
|
|
21
24
|
const tenantKey = dataset.tenantKey ?? configTenantKey;
|
|
@@ -63,7 +66,7 @@ export class HypequeryMCPServer {
|
|
|
63
66
|
},
|
|
64
67
|
{
|
|
65
68
|
name: 'get_dataset_schema',
|
|
66
|
-
description: 'Get the schema (dimensions, metrics, relationships) for a specific dataset',
|
|
69
|
+
description: 'Get the schema (dimensions, measures, named metrics, filters, relationships) for a specific dataset',
|
|
67
70
|
inputSchema: {
|
|
68
71
|
type: 'object',
|
|
69
72
|
properties: {
|
|
@@ -141,7 +144,7 @@ export class HypequeryMCPServer {
|
|
|
141
144
|
},
|
|
142
145
|
{
|
|
143
146
|
name: 'query_dataset',
|
|
144
|
-
description: 'Execute an ad-hoc dataset query with custom dimensions and
|
|
147
|
+
description: 'Execute an ad-hoc dataset query with custom dimensions and measures',
|
|
145
148
|
inputSchema: {
|
|
146
149
|
type: 'object',
|
|
147
150
|
properties: {
|
|
@@ -154,10 +157,10 @@ export class HypequeryMCPServer {
|
|
|
154
157
|
items: { type: 'string' },
|
|
155
158
|
description: 'Dimensions to select',
|
|
156
159
|
},
|
|
157
|
-
|
|
160
|
+
measures: {
|
|
158
161
|
type: 'array',
|
|
159
162
|
items: { type: 'string' },
|
|
160
|
-
description: '
|
|
163
|
+
description: 'Measures to calculate',
|
|
161
164
|
},
|
|
162
165
|
filters: {
|
|
163
166
|
type: 'array',
|
package/dist/tools/args.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import type
|
|
2
|
+
import { type MetricFilter } from '@hypequery/datasets';
|
|
3
3
|
export declare const queryMetricArgsSchema: z.ZodObject<{
|
|
4
4
|
dimensions: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
5
5
|
filters: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
@@ -7,12 +7,12 @@ export declare const queryMetricArgsSchema: z.ZodObject<{
|
|
|
7
7
|
operator: z.ZodEnum<["eq", "neq", "gt", "gte", "lt", "lte", "in", "notIn", "between", "like"]>;
|
|
8
8
|
value: z.ZodEffects<z.ZodAny, any, any>;
|
|
9
9
|
}, "strict", z.ZodTypeAny, {
|
|
10
|
-
field: string;
|
|
11
10
|
operator: "eq" | "neq" | "gt" | "gte" | "lt" | "lte" | "in" | "notIn" | "between" | "like";
|
|
11
|
+
field: string;
|
|
12
12
|
value?: any;
|
|
13
13
|
}, {
|
|
14
|
-
field: string;
|
|
15
14
|
operator: "eq" | "neq" | "gt" | "gte" | "lt" | "lte" | "in" | "notIn" | "between" | "like";
|
|
15
|
+
field: string;
|
|
16
16
|
value?: any;
|
|
17
17
|
}>, "many">>;
|
|
18
18
|
grain: z.ZodOptional<z.ZodEnum<["day", "week", "month", "quarter", "year"]>>;
|
|
@@ -36,8 +36,8 @@ export declare const queryMetricArgsSchema: z.ZodObject<{
|
|
|
36
36
|
metric?: string | undefined;
|
|
37
37
|
dimensions?: string[] | undefined;
|
|
38
38
|
filters?: {
|
|
39
|
-
field: string;
|
|
40
39
|
operator: "eq" | "neq" | "gt" | "gte" | "lt" | "lte" | "in" | "notIn" | "between" | "like";
|
|
40
|
+
field: string;
|
|
41
41
|
value?: any;
|
|
42
42
|
}[] | undefined;
|
|
43
43
|
grain?: "day" | "week" | "month" | "quarter" | "year" | undefined;
|
|
@@ -52,8 +52,8 @@ export declare const queryMetricArgsSchema: z.ZodObject<{
|
|
|
52
52
|
metric?: string | undefined;
|
|
53
53
|
dimensions?: string[] | undefined;
|
|
54
54
|
filters?: {
|
|
55
|
-
field: string;
|
|
56
55
|
operator: "eq" | "neq" | "gt" | "gte" | "lt" | "lte" | "in" | "notIn" | "between" | "like";
|
|
56
|
+
field: string;
|
|
57
57
|
value?: any;
|
|
58
58
|
}[] | undefined;
|
|
59
59
|
grain?: "day" | "week" | "month" | "quarter" | "year" | undefined;
|
|
@@ -71,12 +71,12 @@ export declare const queryDatasetArgsSchema: z.ZodObject<{
|
|
|
71
71
|
operator: z.ZodEnum<["eq", "neq", "gt", "gte", "lt", "lte", "in", "notIn", "between", "like"]>;
|
|
72
72
|
value: z.ZodEffects<z.ZodAny, any, any>;
|
|
73
73
|
}, "strict", z.ZodTypeAny, {
|
|
74
|
-
field: string;
|
|
75
74
|
operator: "eq" | "neq" | "gt" | "gte" | "lt" | "lte" | "in" | "notIn" | "between" | "like";
|
|
75
|
+
field: string;
|
|
76
76
|
value?: any;
|
|
77
77
|
}, {
|
|
78
|
-
field: string;
|
|
79
78
|
operator: "eq" | "neq" | "gt" | "gte" | "lt" | "lte" | "in" | "notIn" | "between" | "like";
|
|
79
|
+
field: string;
|
|
80
80
|
value?: any;
|
|
81
81
|
}>, "many">>;
|
|
82
82
|
grain: z.ZodOptional<z.ZodEnum<["day", "week", "month", "quarter", "year"]>>;
|
|
@@ -94,13 +94,13 @@ export declare const queryDatasetArgsSchema: z.ZodObject<{
|
|
|
94
94
|
offset: z.ZodOptional<z.ZodNumber>;
|
|
95
95
|
} & {
|
|
96
96
|
dataset: z.ZodOptional<z.ZodString>;
|
|
97
|
-
|
|
97
|
+
measures: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
98
98
|
}, "strict", z.ZodTypeAny, {
|
|
99
99
|
dataset?: string | undefined;
|
|
100
100
|
dimensions?: string[] | undefined;
|
|
101
101
|
filters?: {
|
|
102
|
-
field: string;
|
|
103
102
|
operator: "eq" | "neq" | "gt" | "gte" | "lt" | "lte" | "in" | "notIn" | "between" | "like";
|
|
103
|
+
field: string;
|
|
104
104
|
value?: any;
|
|
105
105
|
}[] | undefined;
|
|
106
106
|
grain?: "day" | "week" | "month" | "quarter" | "year" | undefined;
|
|
@@ -110,13 +110,13 @@ export declare const queryDatasetArgsSchema: z.ZodObject<{
|
|
|
110
110
|
}[] | undefined;
|
|
111
111
|
limit?: number | undefined;
|
|
112
112
|
offset?: number | undefined;
|
|
113
|
-
|
|
113
|
+
measures?: string[] | undefined;
|
|
114
114
|
}, {
|
|
115
115
|
dataset?: string | undefined;
|
|
116
116
|
dimensions?: string[] | undefined;
|
|
117
117
|
filters?: {
|
|
118
|
-
field: string;
|
|
119
118
|
operator: "eq" | "neq" | "gt" | "gte" | "lt" | "lte" | "in" | "notIn" | "between" | "like";
|
|
119
|
+
field: string;
|
|
120
120
|
value?: any;
|
|
121
121
|
}[] | undefined;
|
|
122
122
|
grain?: "day" | "week" | "month" | "quarter" | "year" | undefined;
|
|
@@ -126,7 +126,7 @@ export declare const queryDatasetArgsSchema: z.ZodObject<{
|
|
|
126
126
|
}[] | undefined;
|
|
127
127
|
limit?: number | undefined;
|
|
128
128
|
offset?: number | undefined;
|
|
129
|
-
|
|
129
|
+
measures?: string[] | undefined;
|
|
130
130
|
}>;
|
|
131
131
|
export declare function parseToolArgs<T>(schema: z.ZodType<T>, toolName: string, args: unknown): T;
|
|
132
132
|
export declare function toMetricFilters(filters?: Array<{
|
package/dist/tools/args.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"args.d.ts","sourceRoot":"","sources":["../../src/tools/args.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"args.d.ts","sourceRoot":"","sources":["../../src/tools/args.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAA6B,KAAK,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAuBnF,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAGhC,CAAC;AAEH,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAGjC,CAAC;AAWH,wBAAgB,aAAa,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,GAAG,CAAC,CAMzF;AAED,wBAAgB,eAAe,CAC7B,OAAO,GAAE,KAAK,CAAC;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,YAAY,CAAC,UAAU,CAAC,CAAC;IAAC,KAAK,CAAC,EAAE,OAAO,CAAA;CAAE,CAAM,GAC1F,YAAY,EAAE,CAMhB"}
|
package/dist/tools/args.js
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
+
import { SEMANTIC_FILTER_OPERATORS } from '@hypequery/datasets';
|
|
2
3
|
import { MAX_QUERY_LIMIT } from '../types.js';
|
|
3
4
|
const filterSchema = z.object({
|
|
4
5
|
field: z.string().min(1),
|
|
5
|
-
operator: z.enum(
|
|
6
|
+
operator: z.enum(SEMANTIC_FILTER_OPERATORS),
|
|
6
7
|
value: z.any().refine(value => value !== undefined, 'Required'),
|
|
7
8
|
}).strict();
|
|
8
9
|
const orderBySchema = z.object({
|
|
@@ -23,7 +24,7 @@ export const queryMetricArgsSchema = baseQuerySchema.extend({
|
|
|
23
24
|
});
|
|
24
25
|
export const queryDatasetArgsSchema = baseQuerySchema.extend({
|
|
25
26
|
dataset: z.string().min(1).optional(),
|
|
26
|
-
|
|
27
|
+
measures: z.array(z.string().min(1)).optional(),
|
|
27
28
|
});
|
|
28
29
|
function formatZodError(error) {
|
|
29
30
|
return error.issues
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Get Dataset Schema Tool
|
|
3
3
|
*
|
|
4
|
-
* Returns the complete schema for a dataset including dimensions,
|
|
5
|
-
* and relationships.
|
|
4
|
+
* Returns the complete schema for a dataset including dimensions, measures,
|
|
5
|
+
* named metrics, filters, and relationships.
|
|
6
6
|
*/
|
|
7
7
|
import type { DatasetRegistry, MCPToolResponse } from '../types.js';
|
|
8
8
|
export declare function getDatasetSchemaTool(datasets: DatasetRegistry, args: unknown): Promise<MCPToolResponse>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"introspect.d.ts","sourceRoot":"","sources":["../../src/tools/introspect.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;
|
|
1
|
+
{"version":3,"file":"introspect.d.ts","sourceRoot":"","sources":["../../src/tools/introspect.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,KAAK,EACV,eAAe,EAEf,eAAe,EAOhB,MAAM,aAAa,CAAC;AAMrB,wBAAsB,oBAAoB,CACxC,QAAQ,EAAE,eAAe,EACzB,IAAI,EAAE,OAAO,GACZ,OAAO,CAAC,eAAe,CAAC,CA+K1B"}
|
package/dist/tools/introspect.js
CHANGED
|
@@ -1,9 +1,13 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Get Dataset Schema Tool
|
|
3
3
|
*
|
|
4
|
-
* Returns the complete schema for a dataset including dimensions,
|
|
5
|
-
* and relationships.
|
|
4
|
+
* Returns the complete schema for a dataset including dimensions, measures,
|
|
5
|
+
* named metrics, filters, and relationships.
|
|
6
6
|
*/
|
|
7
|
+
import { getDatasetCatalog } from '@hypequery/datasets';
|
|
8
|
+
function isDatasetInstance(value) {
|
|
9
|
+
return !!value && typeof value === 'object' && value.__type === 'dataset';
|
|
10
|
+
}
|
|
7
11
|
export async function getDatasetSchemaTool(datasets, args) {
|
|
8
12
|
// Parse and validate args
|
|
9
13
|
const validatedArgs = args;
|
|
@@ -15,7 +19,6 @@ export async function getDatasetSchemaTool(datasets, args) {
|
|
|
15
19
|
if (!dataset) {
|
|
16
20
|
throw new Error(`Dataset not found: ${datasetName}`);
|
|
17
21
|
}
|
|
18
|
-
// Build schema response with proper types
|
|
19
22
|
const datasetAny = dataset;
|
|
20
23
|
const schema = {
|
|
21
24
|
name: datasetName,
|
|
@@ -24,24 +27,129 @@ export async function getDatasetSchemaTool(datasets, args) {
|
|
|
24
27
|
timeKey: datasetAny.timeKey || datasetAny.config?.timeKey || null,
|
|
25
28
|
tenantKey: datasetAny.tenantKey || datasetAny.config?.tenantKey || null,
|
|
26
29
|
dimensions: {},
|
|
30
|
+
measures: {},
|
|
27
31
|
metrics: {},
|
|
32
|
+
filters: {},
|
|
28
33
|
relationships: {},
|
|
34
|
+
limits: datasetAny.limits,
|
|
29
35
|
};
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
36
|
+
if (isDatasetInstance(dataset)) {
|
|
37
|
+
const catalog = getDatasetCatalog(dataset);
|
|
38
|
+
schema.source = catalog.source;
|
|
39
|
+
schema.timeKey = catalog.timeKey ?? null;
|
|
40
|
+
schema.tenantKey = catalog.tenantKey ?? null;
|
|
41
|
+
schema.limits = catalog.limits;
|
|
42
|
+
for (const [name, dimension] of Object.entries(catalog.dimensions)) {
|
|
33
43
|
const dimSchema = {
|
|
34
|
-
type: dimension.
|
|
35
|
-
column: dimension.column
|
|
44
|
+
type: dimension.type,
|
|
45
|
+
column: dimension.column ?? name,
|
|
46
|
+
sql: dimension.sql ?? null,
|
|
36
47
|
label: dimension.label || name,
|
|
37
48
|
description: dimension.description || '',
|
|
38
|
-
examples:
|
|
49
|
+
examples: [],
|
|
50
|
+
filterable: dimension.filterable,
|
|
51
|
+
groupable: dimension.groupable,
|
|
39
52
|
};
|
|
40
53
|
schema.dimensions[name] = dimSchema;
|
|
41
54
|
}
|
|
55
|
+
for (const [name, measure] of Object.entries(catalog.measures)) {
|
|
56
|
+
const measureSchema = {
|
|
57
|
+
aggregation: measure.aggregation,
|
|
58
|
+
field: measure.field,
|
|
59
|
+
sql: measure.sql ?? null,
|
|
60
|
+
label: measure.label || name,
|
|
61
|
+
description: measure.description || '',
|
|
62
|
+
};
|
|
63
|
+
schema.measures[name] = measureSchema;
|
|
64
|
+
}
|
|
65
|
+
for (const [name, filter] of Object.entries(catalog.filters)) {
|
|
66
|
+
const filterSchema = {
|
|
67
|
+
field: filter.field,
|
|
68
|
+
label: filter.label || name,
|
|
69
|
+
description: filter.description || '',
|
|
70
|
+
operators: filter.operators ? [...filter.operators] : null,
|
|
71
|
+
};
|
|
72
|
+
schema.filters[name] = filterSchema;
|
|
73
|
+
}
|
|
74
|
+
for (const [name, metric] of Object.entries(catalog.metrics)) {
|
|
75
|
+
const metSchema = {
|
|
76
|
+
type: metric.kind,
|
|
77
|
+
aggregation: metric.measures?.join(', ') || '',
|
|
78
|
+
label: metric.label || name,
|
|
79
|
+
description: metric.description || '',
|
|
80
|
+
format: null,
|
|
81
|
+
};
|
|
82
|
+
schema.metrics[name] = metSchema;
|
|
83
|
+
}
|
|
84
|
+
for (const [name, relationship] of Object.entries(catalog.relationships)) {
|
|
85
|
+
const relSchema = {
|
|
86
|
+
type: relationship.kind,
|
|
87
|
+
target: relationship.target,
|
|
88
|
+
from: relationship.from,
|
|
89
|
+
to: relationship.to,
|
|
90
|
+
execution: relationship.execution,
|
|
91
|
+
description: '',
|
|
92
|
+
};
|
|
93
|
+
schema.relationships[name] = relSchema;
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
else {
|
|
97
|
+
// Legacy object-shaped fixtures/configs.
|
|
98
|
+
if (datasetAny.dimensions) {
|
|
99
|
+
for (const [name, dimension] of Object.entries(datasetAny.dimensions)) {
|
|
100
|
+
const dimSchema = {
|
|
101
|
+
type: dimension.fieldType || dimension.type || 'unknown',
|
|
102
|
+
column: dimension.column || name,
|
|
103
|
+
sql: dimension.sql || null,
|
|
104
|
+
label: dimension.label || name,
|
|
105
|
+
description: dimension.description || '',
|
|
106
|
+
examples: dimension.examples || [],
|
|
107
|
+
filterable: dimension.filterable !== false,
|
|
108
|
+
groupable: dimension.groupable !== false,
|
|
109
|
+
};
|
|
110
|
+
schema.dimensions[name] = dimSchema;
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
if (datasetAny.measures) {
|
|
114
|
+
for (const [name, measure] of Object.entries(datasetAny.measures)) {
|
|
115
|
+
const measureSchema = {
|
|
116
|
+
aggregation: measure.aggregation || measure.type || 'unknown',
|
|
117
|
+
field: measure.field || name,
|
|
118
|
+
sql: measure.sql || null,
|
|
119
|
+
label: measure.label || name,
|
|
120
|
+
description: measure.description || '',
|
|
121
|
+
};
|
|
122
|
+
schema.measures[name] = measureSchema;
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
if (datasetAny.filters) {
|
|
126
|
+
for (const [name, filter] of Object.entries(datasetAny.filters)) {
|
|
127
|
+
const filterSchema = {
|
|
128
|
+
field: filter.field || name,
|
|
129
|
+
label: filter.label || name,
|
|
130
|
+
description: filter.description || '',
|
|
131
|
+
operators: filter.operators || null,
|
|
132
|
+
};
|
|
133
|
+
schema.filters[name] = filterSchema;
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
if (datasetAny.relationships) {
|
|
137
|
+
for (const [name, relationship] of Object.entries(datasetAny.relationships)) {
|
|
138
|
+
const rel = relationship;
|
|
139
|
+
const relSchema = {
|
|
140
|
+
type: rel.type || rel.kind || 'unknown',
|
|
141
|
+
target: typeof rel.target === 'function' ? rel.target()?.name || '' : rel.target || rel.dataset?.name || '',
|
|
142
|
+
from: rel.from,
|
|
143
|
+
to: rel.to,
|
|
144
|
+
execution: rel.execution,
|
|
145
|
+
description: rel.description || '',
|
|
146
|
+
};
|
|
147
|
+
schema.relationships[name] = relSchema;
|
|
148
|
+
}
|
|
149
|
+
}
|
|
42
150
|
}
|
|
43
|
-
//
|
|
44
|
-
if (datasetAny.metrics) {
|
|
151
|
+
// Backward compatibility for legacy object-shaped dataset fixtures.
|
|
152
|
+
if (!isDatasetInstance(dataset) && datasetAny.metrics) {
|
|
45
153
|
for (const [name, metric] of Object.entries(datasetAny.metrics)) {
|
|
46
154
|
const metSchema = {
|
|
47
155
|
type: metric.spec?.__type || metric.type || 'unknown',
|
|
@@ -53,18 +161,6 @@ export async function getDatasetSchemaTool(datasets, args) {
|
|
|
53
161
|
schema.metrics[name] = metSchema;
|
|
54
162
|
}
|
|
55
163
|
}
|
|
56
|
-
// Extract relationships with proper typing
|
|
57
|
-
if (datasetAny.relationships) {
|
|
58
|
-
for (const [name, relationship] of Object.entries(datasetAny.relationships)) {
|
|
59
|
-
const rel = relationship;
|
|
60
|
-
const relSchema = {
|
|
61
|
-
type: rel.type || rel.kind || 'unknown',
|
|
62
|
-
target: typeof rel.target === 'function' ? rel.target()?.name || '' : rel.target || rel.dataset?.name || '',
|
|
63
|
-
description: rel.description || '',
|
|
64
|
-
};
|
|
65
|
-
schema.relationships[name] = relSchema;
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
164
|
return {
|
|
69
165
|
content: [
|
|
70
166
|
{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"list-datasets.d.ts","sourceRoot":"","sources":["../../src/tools/list-datasets.ts"],"names":[],"mappings":"AAAA;;;;GAIG;
|
|
1
|
+
{"version":3,"file":"list-datasets.d.ts","sourceRoot":"","sources":["../../src/tools/list-datasets.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,KAAK,EAAE,eAAe,EAAE,eAAe,EAAyC,MAAM,aAAa,CAAC;AAM3G,wBAAsB,gBAAgB,CAAC,QAAQ,EAAE,eAAe,GAAG,OAAO,CAAC,eAAe,CAAC,CA2C1F"}
|
|
@@ -3,17 +3,33 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Returns a list of all available datasets with their descriptions.
|
|
5
5
|
*/
|
|
6
|
+
import { getDatasetCatalog } from '@hypequery/datasets';
|
|
7
|
+
function isDatasetInstance(value) {
|
|
8
|
+
return !!value && typeof value === 'object' && value.__type === 'dataset';
|
|
9
|
+
}
|
|
6
10
|
export async function listDatasetsTool(datasets) {
|
|
7
11
|
const datasetList = Object.entries(datasets).map(([name, dataset]) => {
|
|
8
12
|
const datasetAny = dataset;
|
|
9
13
|
// Try to extract description from dataset instance
|
|
10
14
|
const description = datasetAny.description || datasetAny.config?.description || 'No description available';
|
|
15
|
+
if (isDatasetInstance(dataset)) {
|
|
16
|
+
const catalog = getDatasetCatalog(dataset);
|
|
17
|
+
return {
|
|
18
|
+
name,
|
|
19
|
+
description,
|
|
20
|
+
dimensionCount: Object.keys(catalog.dimensions).length,
|
|
21
|
+
measureCount: Object.keys(catalog.measures).length,
|
|
22
|
+
metricCount: Object.keys(catalog.metrics).length,
|
|
23
|
+
};
|
|
24
|
+
}
|
|
11
25
|
const dimensionCount = datasetAny.dimensions ? Object.keys(datasetAny.dimensions).length : 0;
|
|
26
|
+
const measureCount = datasetAny.measures ? Object.keys(datasetAny.measures).length : 0;
|
|
12
27
|
const metricCount = datasetAny.metrics ? Object.keys(datasetAny.metrics).length : 0;
|
|
13
28
|
return {
|
|
14
29
|
name,
|
|
15
30
|
description,
|
|
16
31
|
dimensionCount,
|
|
32
|
+
measureCount,
|
|
17
33
|
metricCount,
|
|
18
34
|
};
|
|
19
35
|
});
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Query Dataset Tool
|
|
3
3
|
*
|
|
4
|
-
* Executes an ad-hoc dataset query with custom dimensions and
|
|
4
|
+
* Executes an ad-hoc dataset query with custom dimensions and measures.
|
|
5
5
|
*/
|
|
6
6
|
import type { DatasetClient } from '@hypequery/datasets';
|
|
7
7
|
import type { DatasetRegistry, MCPToolResponse, QueryToolOptions } from '../types.js';
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Query Dataset Tool
|
|
3
3
|
*
|
|
4
|
-
* Executes an ad-hoc dataset query with custom dimensions and
|
|
4
|
+
* Executes an ad-hoc dataset query with custom dimensions and measures.
|
|
5
5
|
*/
|
|
6
6
|
import { parseToolArgs, queryDatasetArgsSchema, toMetricFilters } from './args.js';
|
|
7
7
|
export async function queryDatasetTool(datasets, analytics, args, options = {}) {
|
|
8
8
|
const validatedArgs = parseToolArgs(queryDatasetArgsSchema, 'query_dataset', args);
|
|
9
|
-
const { dataset: datasetName, dimensions,
|
|
9
|
+
const { dataset: datasetName, dimensions, measures, filters, grain, orderBy, limit, offset } = validatedArgs;
|
|
10
10
|
if (!datasetName) {
|
|
11
11
|
throw new Error('dataset parameter is required');
|
|
12
12
|
}
|
|
@@ -14,13 +14,13 @@ export async function queryDatasetTool(datasets, analytics, args, options = {})
|
|
|
14
14
|
if (!dataset) {
|
|
15
15
|
throw new Error(`Dataset not found: ${datasetName}`);
|
|
16
16
|
}
|
|
17
|
-
if (!dimensions?.length && !
|
|
18
|
-
throw new Error('At least one dimension or
|
|
17
|
+
if (!dimensions?.length && !measures?.length) {
|
|
18
|
+
throw new Error('At least one dimension or measure must be specified');
|
|
19
19
|
}
|
|
20
20
|
// Build the query with proper types
|
|
21
21
|
const query = {
|
|
22
22
|
dimensions: dimensions || [],
|
|
23
|
-
measures:
|
|
23
|
+
measures: measures || [],
|
|
24
24
|
filters: toMetricFilters(filters),
|
|
25
25
|
orderBy: orderBy || [],
|
|
26
26
|
};
|
package/dist/types.d.ts
CHANGED
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Type definitions for MCP Server
|
|
3
3
|
*/
|
|
4
|
-
import type { MetricFilter, TimeGrain, MetricOrderBy } from '@hypequery/datasets';
|
|
4
|
+
import type { AnyDatasetInstance, MetricFilter, TimeGrain, MetricOrderBy } from '@hypequery/datasets';
|
|
5
5
|
/**
|
|
6
6
|
* Registry of datasets - maps dataset names to dataset instances
|
|
7
|
-
* Using flexible type to accommodate actual dataset structure
|
|
8
7
|
*/
|
|
9
|
-
export type DatasetRegistry = Record<string, Record<string, unknown>>;
|
|
8
|
+
export type DatasetRegistry = Record<string, AnyDatasetInstance | Record<string, unknown>>;
|
|
10
9
|
/**
|
|
11
10
|
* Arguments for query_metric tool
|
|
12
11
|
*/
|
|
@@ -26,7 +25,7 @@ export interface QueryMetricArgs {
|
|
|
26
25
|
export interface QueryDatasetArgs {
|
|
27
26
|
dataset: string;
|
|
28
27
|
dimensions?: string[];
|
|
29
|
-
|
|
28
|
+
measures?: string[];
|
|
30
29
|
filters?: MetricFilter[];
|
|
31
30
|
grain?: TimeGrain;
|
|
32
31
|
orderBy?: MetricOrderBy[];
|
|
@@ -64,18 +63,48 @@ export interface DatasetSchema {
|
|
|
64
63
|
timeKey: string | null;
|
|
65
64
|
tenantKey: string | null;
|
|
66
65
|
dimensions: Record<string, DimensionSchema>;
|
|
66
|
+
measures: Record<string, MeasureSchema>;
|
|
67
67
|
metrics: Record<string, MetricSchema>;
|
|
68
|
+
filters: Record<string, FilterSchema>;
|
|
68
69
|
relationships: Record<string, RelationshipSchema>;
|
|
70
|
+
limits?: {
|
|
71
|
+
maxDimensions?: number;
|
|
72
|
+
maxMeasures?: number;
|
|
73
|
+
maxFilters?: number;
|
|
74
|
+
maxResultSize?: number;
|
|
75
|
+
};
|
|
69
76
|
}
|
|
70
77
|
/**
|
|
71
78
|
* Dimension schema in response
|
|
72
79
|
*/
|
|
73
80
|
export interface DimensionSchema {
|
|
74
81
|
type: string;
|
|
75
|
-
column: string;
|
|
82
|
+
column: string | null;
|
|
83
|
+
sql: string | null;
|
|
76
84
|
label: string;
|
|
77
85
|
description: string;
|
|
78
86
|
examples: string[];
|
|
87
|
+
filterable: boolean;
|
|
88
|
+
groupable: boolean;
|
|
89
|
+
}
|
|
90
|
+
/**
|
|
91
|
+
* Measure schema in response
|
|
92
|
+
*/
|
|
93
|
+
export interface MeasureSchema {
|
|
94
|
+
aggregation: string;
|
|
95
|
+
field: string;
|
|
96
|
+
sql: string | null;
|
|
97
|
+
label: string;
|
|
98
|
+
description: string;
|
|
99
|
+
}
|
|
100
|
+
/**
|
|
101
|
+
* Filter schema in response
|
|
102
|
+
*/
|
|
103
|
+
export interface FilterSchema {
|
|
104
|
+
field: string;
|
|
105
|
+
label: string;
|
|
106
|
+
description: string;
|
|
107
|
+
operators: string[] | null;
|
|
79
108
|
}
|
|
80
109
|
/**
|
|
81
110
|
* Metric schema in response
|
|
@@ -93,6 +122,9 @@ export interface MetricSchema {
|
|
|
93
122
|
export interface RelationshipSchema {
|
|
94
123
|
type: string;
|
|
95
124
|
target: string;
|
|
125
|
+
from?: string;
|
|
126
|
+
to?: string;
|
|
127
|
+
execution?: string;
|
|
96
128
|
description: string;
|
|
97
129
|
}
|
|
98
130
|
/**
|
|
@@ -102,6 +134,7 @@ export interface DatasetListItem {
|
|
|
102
134
|
name: string;
|
|
103
135
|
description: string;
|
|
104
136
|
dimensionCount: number;
|
|
137
|
+
measureCount?: number;
|
|
105
138
|
metricCount: number;
|
|
106
139
|
}
|
|
107
140
|
/**
|
package/dist/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EACV,YAAY,EACZ,SAAS,EACT,aAAa,EACd,MAAM,qBAAqB,CAAC;AAE7B
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"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"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hypequery/mcp",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"description": "Model Context Protocol (MCP) server for Hypequery semantic layer",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"type": "module",
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"dist"
|
|
21
21
|
],
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@hypequery/datasets": "^0.2.
|
|
23
|
+
"@hypequery/datasets": "^0.2.1",
|
|
24
24
|
"@modelcontextprotocol/sdk": "^1.29.0",
|
|
25
25
|
"zod": "^3.23.8"
|
|
26
26
|
},
|