Skip to main content
Glama
ckan-thaigdc-mcp

ckan-thaigdc-mcp

by nungsatick

Search CKAN Datasets

ckan_search_datasets
Read-onlyIdempotent

Search a CKAN catalog's public datasets by text, title words, tags, format, organization, or group, and return compact results with optional facet counts.

Instructions

Search one catalog's public datasets, with optional filters and counts per category (facets). Returns compact summaries; use ckan_get_dataset for full metadata and the file list.

Examples:

  • "ชุดข้อมูลเกี่ยวกับประชากร" -> query="ประชากร"

  • Words that must be in the title -> title="ประชากร อายุ"

  • "สถิติที่มีไฟล์ CSV" -> query="สถิติ", format="CSV", data_type="stat"

  • "มีหน่วยงานไหนบ้างและชุดข้อมูลละกี่ชุด" -> limit=0, facets=["organization"]

Use names returned by facets, ckan_list_organizations or ckan_list_groups for the organization and group filters.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "site": "<site>"
    },
    "name": "ckan_search_datasets"
  }
}

Input Schema

NameRequiredDescriptionDefault
fqNoAdvanced: extra raw Solr filter, combined with AND
tagNoExact tag, e.g. 'ประชากร'
siteYesSite alias from ckan_list_sites, e.g. 'nso'
sortNorelevance, modified or created (newest first), or titlerelevance
groupNoGroup name (slug), not its display title
limitNoDatasets to return. 0 returns only counts and facets
queryNoFree text, Thai or English. Do not write field:value here for Thai text; use title or the filters
titleNoSpace-separated words that must all appear in the title
facetsNoFields to count matches by
formatNoResource format, e.g. 'CSV'
offsetNoMatches to skip, for pagination
data_typeNoOne of stat, record, gis, multi, other, or the Thai value such as 'ข้อมูลสถิติ'
organizationNoOrganization name (slug), not its display title
response_formatNo'markdown' for readable text, 'json' for structured datamarkdown

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare the operation read-only, open-world, idempotent, and non-destructive, so the description does not need to restate safety. It adds useful behavior beyond annotations by noting compact summaries, facet counts, public-dataset scope, and the limit=0 facet-count pattern.

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

Conciseness5/5

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

The description is front-loaded with the core operation and the ckan_get_dataset routing, then uses a compact example block and a short parameter-name note. Every sentence contributes either scope, an example, or filter-value guidance.

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

Completeness4/5

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

For a 14-parameter search tool with no output schema, the description covers the main invocation patterns and tells the agent that returned items are compact summaries. It leaves site aliasing, pagination, sort, fq, and response_format to the fully covered schema, which is acceptable but keeps it short of perfect completeness.

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

Parameters4/5

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

Schema coverage is 100%, so the baseline is 3, but the description adds real semantic guidance beyond the schema: it shows how natural-language Thai requests map to query, title, format, data_type, facets, and limit. It also explains that query is free text while title requires words to appear in the title, and that organization/group filters use names from facets or the list tools.

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 names a specific verb and resource: searching one catalog's public datasets with optional filters and facet counts. It explicitly distinguishes the result from ckan_get_dataset by saying this returns compact summaries while that tool gives full metadata and the file list.

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

Usage Guidelines4/5

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

It clearly routes full-metadata needs to ckan_get_dataset and provides concrete examples for query, title, format, data_type, facets, and limit usage. It does not explicitly say when to choose this over other search-adjacent siblings such as ckan_search_tags or ckan_find_federated_copies, so guidance is strong but not exhaustive.

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