search-console-mcp 1.10.0 → 1.10.1

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.
@@ -7,10 +7,13 @@ export function clearAnalyticsCache() {
7
7
  }
8
8
  function generateCacheKey(options) {
9
9
  const clone = { ...options };
10
- // Sort arrays to ensure deterministic keys
10
+ // Dimensions order matters because it determines the order of keys in the response.
11
+ // We should NOT sort them.
12
+ /*
11
13
  if (clone.dimensions) {
12
- clone.dimensions = [...clone.dimensions].sort();
14
+ clone.dimensions = [...clone.dimensions].sort();
13
15
  }
16
+ */
14
17
  if (clone.filters) {
15
18
  clone.filters = [...clone.filters].sort((a, b) => (a.dimension + a.operator + a.expression).localeCompare(b.dimension + b.operator + b.expression));
16
19
  }
@@ -66,12 +66,7 @@ export async function detectCannibalization(siteUrl, options = {}) {
66
66
  startDate: startDate.toISOString().split('T')[0],
67
67
  endDate: endDate.toISOString().split('T')[0],
68
68
  dimensions: ['query', 'page'],
69
- limit: 10000,
70
- filters: [{
71
- dimension: 'position',
72
- operator: 'smallerThan',
73
- expression: '20' // Only care about cannibalization on first 2 pages
74
- }]
69
+ limit: 10000
75
70
  });
76
71
  // Group by query
77
72
  const queryMap = new Map();
@@ -79,7 +74,7 @@ export async function detectCannibalization(siteUrl, options = {}) {
79
74
  const query = row.keys?.[0] ?? '';
80
75
  const page = row.keys?.[1] ?? '';
81
76
  const impressions = row.impressions ?? 0;
82
- if (impressions < minImpressions)
77
+ if (impressions < minImpressions || (row.position ?? 100) > 20)
83
78
  continue;
84
79
  if (!queryMap.has(query)) {
85
80
  queryMap.set(query, []);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "search-console-mcp",
3
- "version": "1.10.0",
3
+ "version": "1.10.1",
4
4
  "mcpName": "io.github.saurabhsharma2u/search-console-mcp",
5
5
  "description": "MCP server for Google Search Console API",
6
6
  "type": "module",