Skip to main content
Glama
hanhsienlei

au-opendata-mcp

by hanhsienlei

Query Resource

query_resource

Execute a single read-only DuckDB SELECT over one Australian open data resource to retrieve matching rows.

Instructions

Run a read-only SQL query over one tabular resource and get the rows back.

The SQL dialect is DuckDB. The resource is always exposed as the table t, whatever the file was called. Only a single SELECT statement is permitted: no DDL, no DML, no reading other tables or files.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sqlYesA single DuckDB SELECT over the table `t`.
limitNoMaximum rows to return, capped at 100.
portalNoThe portal the resource belongs to.data.gov.au
resource_idYesFrom get_dataset's resources list. Must have queryable == "yes".

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4/5.0
Behavior4/5

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

With no annotations, the description carries the full behavioral burden and largely succeeds: it discloses read-only semantics, the DuckDB dialect, the fixed table alias `t`, and hard restrictions (no DDL, no DML, no other tables or files). It omits timeout/error behavior on violations, which keeps it short of a 5.

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 short paragraphs, front-loaded with the action and then the constraints. Every sentence carries information; nothing is repeated from the name or title.

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?

An output schema exists, so return format need not be explained, and required params are documented in the schema. The description covers dialect, restriction scope, and table naming; only edge-case behavior (errors, timeouts) is missing.

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 baseline is 3. The description reinforces the dialect and table naming for the `sql` param but adds no syntax examples, escaping rules, or guidance beyond what the schema already states.

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?

Starts with a specific verb+resource ('Run a read-only SQL query over one tabular resource') and states the return ('get the rows back'). This distinguishes it from siblings like preview_resource and get_dataset, which do not accept SQL.

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 constrains the operation (single SELECT, DuckDB, table `t`) but never says when to choose this over preview_resource or how to obtain a queryable resource_id (the schema covers the latter). Usage is implied by the SQL-execution framing rather than explicitly routed.

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