Skip to main content
Glama
cliwant

mcp-sam-gov

by cliwant

ckan_query

Read-only

Query government spending and procurement data from CKAN datastores (data.ca.gov, data.virginia.gov, data.boston.gov) using a resource ID, with optional filters, full-text search, and pagination.

Instructions

Query rows from an allowlisted CKAN datastore resource (keyless; the FIRST source on the R2 DataSource port — state/city spend/checkbook/procurement/vendor tables on the identical CKAN Action API). Input host (curated allowlist enum — the SSRF host guard: data.ca.gov, data.virginia.gov, data.boston.gov), resourceId (36-char lowercase UUID, from ckan_discover_datasets), optional q (full-text), filters (constrained object {field:value} we JSON.stringify), sort, limit (≤1000, def 100), offset. HONESTY: CKAN's envelope carries a real result.total — the DEFAULT is an EXACT total (exact totalAvailable + hasMore); the rare estimated total (total_was_estimated:true) is disclosed via totalIsEstimated + a note and does NOT drive pagination (it can be above OR below the truth). Genuine-empty ⇒ complete:true/total:0; an outage/404/409 or success:false THROWS (never a fake empty). Values are typed per result.fields[].type.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
qNoOptional full-text search across the record (CKAN `q`).
hostYesWhich allowlisted CKAN portal to query (curated .gov hosts — the SSRF host allowlist, no free host): data.ca.gov (CA), data.virginia.gov (VA — eVA), data.boston.gov (City of Boston Checkbook).
sortNoOptional sort, e.g. '_id asc' or 'amount desc'. A bad field ⇒ 409 ⇒ invalid_input.
limitNoRows per page, 1..1000, default 100.
offsetNo0-based row offset for pagination, default 0.
filtersNoOptional structured field filters, e.g. {"Fiscal Year":"2013-2014"}. A constrained object (string/number/array values only) that we JSON.stringify; a bad field ⇒ upstream HTTP 409 ⇒ invalid_input (surfaced, never silent).
resourceIdYesThe datastore resource_id, a 36-char lowercase UUID e.g. 'bb82edc5-9c78-44e2-8947-68ece26197c5' (from ckan_discover_datasets, a datastoreActive:true resource).
Behavior5/5

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

Annotations provide readOnlyHint and openWorldHint, but the description greatly expands with details on result.total behavior, total_was_estimated flag, empty vs error handling, SSRF host guard, and value typing. No contradiction with annotations.

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

Conciseness3/5

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

The description is long and packed with detail, but some content is verbose and technical (e.g., 'keyless; the FIRST source on the R2 DataSource port'). It could be condensed without losing essential information. Front-loading is somewhat present with the main purpose stated first.

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?

Without an output schema, the description explains result.total and totalIsEstimated, but does not fully specify the return structure beyond value typing. It covers error cases, pagination, and limitations. Almost complete but missing explicit output field list.

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%, but the description adds significant meaning beyond descriptions: explains q as full-text, filters as structured object with JSON.stringify, limit cap, offset default, sort error behavior, host enum details, and resourceId format. Every parameter benefits.

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 it queries rows from an allowlisted CKAN datastore resource, specifying the host and resourceId constraints, and ties to sibling ckan_discover_datasets. It distinctively focuses on CKAN government data portals, differentiating from siblings like socrata_query or cms_query_dataset.

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

Usage Guidelines3/5

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

The description implies use for querying government CKAN data but does not explicitly state when to use vs alternatives. It mentions 'keyless; the FIRST source on the R2 DataSource port', which is not helpful for an agent. No clear when-not-to-use or alternative guidance.

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/cliwant/mcp-sam-gov'

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