Skip to main content
Glama
ondata

CKAN MCP Server

by ondata

Find Relevant CKAN Datasets

ckan_find_relevant_datasets
Read-onlyIdempotent

Find and rank open datasets by relevance to a natural language query, using weighted scoring across title, tags, notes, and organization fields.

Instructions

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)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNoNumber of datasets to return
queryYesNatural language or keyword query to match against dataset title, notes, tags, organization, holder and publisher
weightsNoPer-field scoring weights; unspecified fields use defaults
server_urlYesBase URL of the CKAN server (e.g., https://dati.gov.it/opendata)
query_parserNoOverride search parser ('text' forces text:(...) on non-fielded queries)
response_formatNoOutput format: 'markdown' for human-readable or 'json' for machine-readablemarkdown
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare readOnlyHint=true, idempotentHint=true, and destructiveHint=false, which cover safety and side effects. The description adds that it uses package_search for discovery and applies a local scoring model, which is useful but not critical beyond annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is well-structured with clear sections (main purpose, when to use, args, returns, examples, workflow). It is somewhat lengthy but every sentence adds value, and key information is front-loaded.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity (6 parameters, nested weights object, 2 enums) and lack of output schema, the description covers purpose, usage, parameter semantics, examples, and typical workflow comprehensively, making it complete for an AI agent to use correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100% with descriptions, but the description adds significant value by explaining the nuanced difference between holder, organization, and publisher weights with domain context, and provides multiple examples showing parameter usage.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool finds and ranks datasets by relevance using weighted fields, and distinguishes it from ckan_package_search, which is a sibling tool. The verb 'find and rank' and specific resource 'datasets' make the purpose precise.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description explicitly states when to use this tool versus ckan_package_search, including specific use cases for each. It also provides a typical workflow sequence, giving clear guidance on tool selection.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/ondata/ckan-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server