@hypequery/mcp 0.8.6 → 0.9.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.
@@ -1 +1 @@
1
- {"version":3,"file":"query-dataset.d.ts","sourceRoot":"","sources":["../../src/tools/query-dataset.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAgB,MAAM,qBAAqB,CAAC;AAEvE,OAAO,KAAK,EAAE,eAAe,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAYtF,wBAAsB,gBAAgB,CACpC,QAAQ,EAAE,eAAe,EACzB,SAAS,EAAE,aAAa,EACxB,IAAI,EAAE,OAAO,EACb,OAAO,GAAE,gBAAqB,GAC7B,OAAO,CAAC,eAAe,CAAC,CAiE1B"}
1
+ {"version":3,"file":"query-dataset.d.ts","sourceRoot":"","sources":["../../src/tools/query-dataset.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAgB,MAAM,qBAAqB,CAAC;AAEvE,OAAO,KAAK,EAAE,eAAe,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAYtF,wBAAsB,gBAAgB,CACpC,QAAQ,EAAE,eAAe,EACzB,SAAS,EAAE,aAAa,EACxB,IAAI,EAAE,OAAO,EACb,OAAO,GAAE,gBAAqB,GAC7B,OAAO,CAAC,eAAe,CAAC,CAqE1B"}
@@ -13,7 +13,7 @@ import { createMCPToolResponse } from './utils/tool-response.js';
13
13
  export async function queryDatasetTool(datasets, analytics, args, options = {}) {
14
14
  const inputSchema = options.inputSchema ?? buildMCPQuerySchemas(datasets, options.limits).queryDataset;
15
15
  const validatedArgs = parseToolArgs(inputSchema, 'query_dataset', args);
16
- const { dataset: datasetName, dimensions, measures, filters, segments, grain, timezone, orderBy } = validatedArgs;
16
+ const { dataset: datasetName, dimensions, measures, filters, having, segments, grain, timezone, orderBy } = validatedArgs;
17
17
  if (!datasetName) {
18
18
  throw new MCPToolError('MCP_INVALID_ARGUMENTS', 'dataset parameter is required');
19
19
  }
@@ -42,6 +42,9 @@ export async function queryDatasetTool(datasets, analytics, args, options = {})
42
42
  if (segments?.length) {
43
43
  query.segments = segments;
44
44
  }
45
+ if (having?.length) {
46
+ query.having = having;
47
+ }
45
48
  if (pagination.offset !== undefined) {
46
49
  query.offset = pagination.offset;
47
50
  }
@@ -13,5 +13,13 @@ export declare function buildMCPQuerySchemas(datasets: DatasetRegistry, configur
13
13
  * withheld as a direct target, which a hosted gateway needs when a caller is
14
14
  * entitled to a metric on a dataset it may not query itself.
15
15
  */
16
- queryableDatasets?: readonly string[]): CanonicalSemanticQuerySchemas;
16
+ queryableDatasets?: readonly string[],
17
+ /**
18
+ * Advertise and accept `having` on `query_dataset`. On by default for every
19
+ * MCP surface: CORE-03 requires the hosted gateway to list exactly what the
20
+ * local executor runs, so hosted execution must support it too.
21
+ */
22
+ features?: {
23
+ readonly having?: boolean;
24
+ }): CanonicalSemanticQuerySchemas;
17
25
  //# sourceMappingURL=canonical-query-schemas.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"canonical-query-schemas.d.ts","sourceRoot":"","sources":["../../../src/tools/utils/canonical-query-schemas.ts"],"names":[],"mappings":"AACA,OAAO,EAGL,KAAK,6BAA6B,EAEnC,MAAM,qBAAqB,CAAC;AAE7B,OAAO,KAAK,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AA0BtE;;;;GAIG;AACH,wBAAgB,oBAAoB,CAClC,QAAQ,EAAE,eAAe,EACzB,UAAU,CAAC,EAAE,cAAc;AAC3B;;;;;;GAMG;AACH,iBAAiB,CAAC,EAAE,SAAS,MAAM,EAAE,GACpC,6BAA6B,CAqG/B"}
1
+ {"version":3,"file":"canonical-query-schemas.d.ts","sourceRoot":"","sources":["../../../src/tools/utils/canonical-query-schemas.ts"],"names":[],"mappings":"AACA,OAAO,EAGL,KAAK,6BAA6B,EAEnC,MAAM,qBAAqB,CAAC;AAE7B,OAAO,KAAK,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AA0BtE;;;;GAIG;AACH,wBAAgB,oBAAoB,CAClC,QAAQ,EAAE,eAAe,EACzB,UAAU,CAAC,EAAE,cAAc;AAC3B;;;;;;GAMG;AACH,iBAAiB,CAAC,EAAE,SAAS,MAAM,EAAE;AACrC;;;;GAIG;AACH,QAAQ,GAAE;IAAE,QAAQ,CAAC,MAAM,CAAC,EAAE,OAAO,CAAA;CAAqB,GACzD,6BAA6B,CAsG/B"}
@@ -34,7 +34,13 @@ export function buildMCPQuerySchemas(datasets, configured,
34
34
  * withheld as a direct target, which a hosted gateway needs when a caller is
35
35
  * entitled to a metric on a dataset it may not query itself.
36
36
  */
37
- queryableDatasets) {
37
+ queryableDatasets,
38
+ /**
39
+ * Advertise and accept `having` on `query_dataset`. On by default for every
40
+ * MCP surface: CORE-03 requires the hosted gateway to list exactly what the
41
+ * local executor runs, so hosted execution must support it too.
42
+ */
43
+ features = { having: true }) {
38
44
  const limits = resolveQueryLimits(undefined, configured);
39
45
  const queryable = queryableDatasets === undefined ? undefined : new Set(queryableDatasets);
40
46
  const entries = Object.entries(datasets).sort(([left], [right]) => (left < right ? -1 : left > right ? 1 : 0));
@@ -58,6 +64,7 @@ queryableDatasets) {
58
64
  grainField: 'grain',
59
65
  ...limits,
60
66
  ...(queryableDatasets === undefined ? {} : { queryableDatasets }),
67
+ ...(features.having ? { having: true } : {}),
61
68
  });
62
69
  }
63
70
  const datasetSchemas = [];
@@ -66,7 +73,7 @@ queryableDatasets) {
66
73
  const metricJsonSchemas = [];
67
74
  for (const [name, dataset] of entries) {
68
75
  if (isCanonicalSchemaSource(dataset)) {
69
- const exact = buildCanonicalSemanticQuerySchemas(withLegacyDirectMetrics({ [name]: dataset }), { grainField: 'grain', ...limits });
76
+ const exact = buildCanonicalSemanticQuerySchemas(withLegacyDirectMetrics({ [name]: dataset }), { grainField: 'grain', ...limits, ...(features.having ? { having: true } : {}) });
70
77
  if (queryable === undefined || queryable.has(name)) {
71
78
  datasetSchemas.push(exact.queryDataset);
72
79
  datasetJsonSchemas.push(exact.queryDatasetJsonSchema);
package/dist/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const MCP_PACKAGE_VERSION = "0.8.6";
1
+ export declare const MCP_PACKAGE_VERSION = "0.9.0";
2
2
  //# sourceMappingURL=version.d.ts.map
package/dist/version.js CHANGED
@@ -2,4 +2,4 @@
2
2
  //
3
3
  // Resolved at build time rather than read from package.json at import time, so
4
4
  // importing this package touches no filesystem and survives bundling.
5
- export const MCP_PACKAGE_VERSION = '0.8.6';
5
+ export const MCP_PACKAGE_VERSION = '0.9.0';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hypequery/mcp",
3
- "version": "0.8.6",
3
+ "version": "0.9.0",
4
4
  "description": "Governed ClickHouse MCP server for semantic metrics, datasets, Claude, Cursor, and AI agents",
5
5
  "keywords": [
6
6
  "mcp",
@@ -33,13 +33,13 @@
33
33
  "dist"
34
34
  ],
35
35
  "dependencies": {
36
- "@hypequery/datasets": "^0.22.0",
37
- "@modelcontextprotocol/sdk": "^1.30.1",
36
+ "@hypequery/datasets": "^0.23.0",
37
+ "@modelcontextprotocol/sdk": "^1.32.1",
38
38
  "zod": "^3.23.8"
39
39
  },
40
40
  "devDependencies": {
41
41
  "@types/node": "^20.11.30",
42
- "typescript": "^5.7.3",
42
+ "typescript": "^6.0.3",
43
43
  "vitest": "^5.0.2",
44
44
  "@hypequery/clickhouse": "2.13.0"
45
45
  },