Find and rank datasets by relevance to a query using weighted fields. Use this instead of ckan_package_search when you want relevance-ranked results with explicit scoring across title, notes, tags, and organization fields. Use ckan_package_search instead when you need Solr filter syntax, facets, ...
Risk signalsAccepts freeform code/query input (query) · High parameter count (12 properties)
Part of the Ckan server.
Free to start. No card required.
AI agents call ckan_find_relevant_datasets to retrieve information from Ckan without modifying any data. This is common in research, monitoring, and reporting workflows where the agent needs context before taking action. Because read operations don't change state, they are generally safe to allow without restrictions -- but you may still want rate limits to control API costs.
Even though ckan_find_relevant_datasets only reads data, uncontrolled read access can leak sensitive information or rack up API costs. An agent caught in a retry loop could make thousands of calls per minute. A rate limit gives you a safety net without blocking legitimate use.
Read-only tools are safe to allow by default. No rate limit needed unless you want to control costs.
{
"version": "1",
"default": "deny",
"tools": {
"ckan_find_relevant_datasets": {}
}
} See the full Ckan policy for all 20 tools.
These attack patterns abuse exactly the kind of access ckan_find_relevant_datasets gives an agent. Each links to the full case and the policy that stops it:
Other read tools across the catalogue. The same approach applies to each: allow, with a rate cap to control cost.
Find and rank datasets by relevance to a query using weighted fields. Use this instead of ckan_package_search when you want relevance-ranked results with explicit scoring across title, notes, tags, and organization fields. Use ckan_package_search instead when you need Solr filter syntax, facets, or pagination. Uses package_search for discovery and applies a local scoring model. Args: - server_url (string): Base URL of CKAN server (e.g., "https://dati.gov.it/opendata") - query (string): Natural language or keyword query (e.g., "mobilità urbana", "air quality") - limit (number): Number of datasets to return (default: 10) - weights (object): Field weights for scoring — higher weight = more influence on rank Default: title=4, tags=3, notes=2, organization=1, holder=4, publisher=2 Note on holder vs organization: on federated catalogs (e.g. dati.gov.it), organization is the harvesting catalog (e.g. Regione Puglia), while holder (DCAT-AP_IT dct:rightsHolder) is the actual data owner (e.g. Comune di Lecce). Queries like "datasets from a specific Comune" match holder correctly; matching only organization misses datasets harvested via aggregators. publisher (dct:publisher) is scored separately at lower weight as it can contain technical roles ("Redazione OD") rather than the institutional owner. - query_parser ('default' | 'text'): Override search parser behavior - response_format ('markdown' | 'json'): Output format Returns: Ranked datasets with relevance scores and per-field score breakdowns Examples: - { server_url: "https://dati.gov.it/opendata", query: "mobilità" } - { server_url: "...", query: "trasporti", limit: 5, weights: { title: 5, notes: 2 } } - { server_url: "...", query: "defibrillatori Comune di Lecce", weights: { holder: 5 } } Typical workflow: ckan_find_relevant_datasets → ckan_package_show (inspect top results) → ckan_datastore_search (query data). It is categorised as a Read tool in the Ckan MCP Server, which means it retrieves data without modifying state.
Register the Ckan MCP server in PolicyLayer and add a rule for ckan_find_relevant_datasets: allow, deny, rate-limit, or require approval. Point your MCP client at the PolicyLayer proxy URL and the rule is enforced on every call, before it reaches Ckan. Nothing to install.
ckan_find_relevant_datasets is a Read tool with low risk. Read-only tools are generally safe to allow by default.
Yes. Add a rate_limit block to the ckan_find_relevant_datasets rule in your PolicyLayer policy. For example, setting max: 10 and window: 60 limits the tool to 10 calls per minute. Rate limits are tracked per agent session and reset automatically.
Set action: deny in the PolicyLayer policy for ckan_find_relevant_datasets. The AI agent will receive a policy violation error and cannot call the tool. You can also include a reason field to explain why the tool is blocked.
ckan_find_relevant_datasets is provided by the Ckan MCP server (@aborruso/ckan-mcp-server). PolicyLayer sits as a proxy in front of this server to enforce policies before tool calls reach the server.
Deterministic rules across all 20 Ckan tools. Per-identity grants. Full audit log. Live in minutes. Nothing to install.
Free to start. No card required.
4,600+ MCP servers and 31,000+ tools scanned and risk-classified.