@aborruso/ckan-mcp-server 0.4.72 → 0.4.73

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/LOG.md CHANGED
@@ -1,5 +1,10 @@
1
1
  # LOG
2
2
 
3
+ ## 2026-03-05 (v0.4.73)
4
+
5
+ - feat: `package_show` now includes `api_json_url` for dataset and each resource (direct CKAN API JSON link)
6
+ - fix: `api_json_url` uses portal-specific API path via `getPortalApiPath` instead of hardcoded `/api/3/action`
7
+
3
8
  ## 2026-03-05 (v0.4.72)
4
9
 
5
10
  - fix: `package_show` JSON now includes `hvd_category`, `applicable_legislation`, `frequency`, `language`, `publisher_name`, `holder_name`
package/dist/index.js CHANGED
@@ -729,6 +729,8 @@ var formatPackageShowMarkdown = (result, serverUrl) => {
729
729
  markdown += `**Server**: ${serverUrl}
730
730
  `;
731
731
  markdown += `**Link**: ${getDatasetViewUrl(serverUrl, result)}
732
+ `;
733
+ markdown += `**Full JSON metadata**: ${serverUrl.replace(/\/$/, "")}${getPortalApiPath(serverUrl)}/package_show?id=${result.id}
732
734
 
733
735
  `;
734
736
  markdown += `## Basic Information
@@ -851,6 +853,8 @@ ${result.notes}
851
853
  markdown += `- **DataStore**: \u2753 Not reported by portal
852
854
  `;
853
855
  }
856
+ markdown += `- **Full JSON metadata**: ${serverUrl.replace(/\/$/, "")}${getPortalApiPath(serverUrl)}/resource_show?id=${resource.id}
857
+ `;
854
858
  markdown += "\n";
855
859
  }
856
860
  }
@@ -923,9 +927,13 @@ function compactPackageShow(result, serverUrl) {
923
927
  size: r.size || null,
924
928
  datastore_active: r.datastore_active ?? null,
925
929
  created: r.created || null,
926
- last_modified: r.last_modified || null
930
+ last_modified: r.last_modified || null,
931
+ ...serverUrl ? { api_json_url: `${serverUrl.replace(/\/$/, "")}${getPortalApiPath(serverUrl)}/resource_show?id=${r.id}` } : {}
927
932
  })),
928
- ...serverUrl ? { view_url: getDatasetViewUrl(serverUrl, result) } : {}
933
+ ...serverUrl ? {
934
+ view_url: getDatasetViewUrl(serverUrl, result),
935
+ api_json_url: `${serverUrl.replace(/\/$/, "")}${getPortalApiPath(serverUrl)}/package_show?id=${result.id}`
936
+ } : {}
929
937
  };
930
938
  }
931
939
  function registerPackageTools(server2) {
@@ -1486,8 +1494,8 @@ Returns (JSON format):
1486
1494
  author, maintainer,
1487
1495
  frequency, language, publisher_name, holder_name,
1488
1496
  hvd_category, applicable_legislation,
1489
- resources (id, name, format, url, size, datastore_active, created, last_modified),
1490
- view_url
1497
+ resources (id, name, format, url, size, datastore_active, created, last_modified, api_json_url),
1498
+ view_url, api_json_url
1491
1499
 
1492
1500
  Examples:
1493
1501
  - { server_url: "https://dati.gov.it/opendata", id: "dataset-name" }
@@ -4821,7 +4829,7 @@ var registerAllPrompts = (server2) => {
4821
4829
  function createServer() {
4822
4830
  return new McpServer({
4823
4831
  name: "ckan-mcp-server",
4824
- version: "0.4.72"
4832
+ version: "0.4.73"
4825
4833
  });
4826
4834
  }
4827
4835
  function registerAll(server2) {