Skip to main content
Glama

Datastore Query

datastore_query
Read-onlyIdempotent

Read actual table rows from a Jersey resource via CKAN datastore_search. Works only for resources with datastore_active=true (get the resource_id from dataset_details). Returns parsed records plus field definitions — e.g. population projections by Year/Age/Sex.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
qNoFull-text filter across the table.
limitNoMax rows, 1-32000 (default 100).
offsetNo0-based row offset for paging.
filtersNoExact-match column filters, e.g. {"Sex":"F","Year":2025}.
resource_idYesResource UUID from dataset_details, e.g. "6e222cd7-d296-429a-abea-09001dcc45f6".

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / examples
      Added value: +[
      +  {
      +    "limit": 100,
      +    "resource_id": "6e222cd7-d296-429a-abea-09001dcc45f6"
      +  },
      +  {
      +    "filters": {
      +      "Sex": "F",
      +      "Year": 2025
      +    },
      +    "limit": 50,
      +    "resource_id": "6e222cd7-d296-429a-abea-09001dcc45f6"
      +  }
      +]
  2. First observed

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already indicate read-only, idempotent, non-destructive behavior. The description adds that the tool returns 'parsed records plus field definitions', giving insight into the output beyond basic read semantics.

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?

Two sentences that immediately convey purpose, prerequisite, and return value. No extraneous text; front-loaded with the key action.

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 absence of an output schema, the description adequately explains the return format. The prerequisite condition is stated, and all parameters are covered by the schema. Handles a moderately complex tool (5 params, nested filters) well.

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

Parameters3/5

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

Schema coverage is 100%, so the description does not need to add much. It provides useful context for the resource_id parameter by referencing dataset_details, and the examples illustrate usage, but no parameter-specific details are added beyond what the schema offers.

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?

Clearly states the tool reads actual table rows via CKAN datastore_search, specifying the resource type and a concrete example (population projections). Distinguishes from siblings like search_datasets by focusing on row-level data retrieval.

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?

Explicitly states the prerequisite that datastore_active must be true and directs the user to obtain resource_id from dataset_details. Provides clear context for when to use the tool, though no direct comparison with alternatives is given.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.