Analyze CKAN Datasets and DataStore Schema
ckan_analyze_datasetsAnalyze CKAN datasets to list resources and inspect DataStore field schemas, including names, types, labels, and record counts, enabling informed data queries.
Instructions
Search datasets and inspect the DataStore schema of queryable resources.
For each dataset found, lists all resources. For DataStore-enabled resources, fetches the full field schema (name, type, and label/notes when available) plus total record count — all in one call.
Use this before ckan_datastore_search to understand what fields are available and what data to expect.
Args:
server_url (string): Base URL of CKAN server
q (string): Solr search query (e.g. "incidenti", "title:ambiente")
rows (number): Max datasets to analyze (default 5, max 20)
response_format ('markdown' | 'json'): Output format
Returns: For each dataset: title, ID, organization, and per DataStore resource: field schema with label/notes (when available from DataStore Dictionary) and record count.
Typical workflow: ckan_analyze_datasets → ckan_datastore_search (with known field names)
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| q | Yes | Solr search query (e.g. 'incidenti', 'title:ambiente') | |
| rows | No | Max datasets to analyze (default 5, max 20) | |
| server_url | Yes | Base URL of the CKAN server (e.g., https://dati.comune.messina.it) | |
| response_format | No | Output format: 'markdown' for human-readable or 'json' for machine-readable | markdown |