Skip to main content
Glama

Toronto Query

toronto_query
Read-onlyIdempotent

Query any City of Toronto datastore resource (open.toronto.ca, CKAN) by its resource id (a UUID). Supports a free-text q, exact-match filters (field -> value), sort ("field desc"), limit and offset. Use toronto_datasets to find a resource id, or toronto_recent for the common ones.

Example tool call

This call uses example arguments supplied in the tool’s input schema.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "limit": 100,
      "resource_id": "6d0229af-bc54-46de-9c2b-26759b01dd05"
    },
    "name": "toronto_query"
  }
}

Input Schema

NameRequiredDescriptionDefault
qNoFree-text search across columns.
sortNoSort clause, e.g. "APPLICATION_DATE desc".
limitNoMax rows (default 100, max 1000).
offsetNoRow offset for paging.
filtersNoExact-match filters as a JSON object, e.g. {"PERMIT_TYPE":"New Building"}.
resource_idYesCKAN datastore resource id (UUID), e.g. "6d0229af-bc54-46de-9c2b-26759b01dd05".

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / examples
      Added value: +[
      +  {
      +    "limit": 100,
      +    "resource_id": "6d0229af-bc54-46de-9c2b-26759b01dd05"
      +  },
      +  {
      +    "filters": {
      +      "PERMIT_TYPE": "New Building"
      +    },
      +    "limit": 50,
      +    "resource_id": "6d0229af-bc54-46de-9c2b-26759b01dd05",
      +    "sort": "APPLICATION_DATE desc"
      +  }
      +]
  2. First observed

TDQS

A4.2/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true, idempotentHint=true, destructiveHint=false and openWorldHint=true, so the safety profile is fully covered upstream. The description adds the useful framing that this is a read over CKAN datastore resources but says nothing about rate limits, response shape, or whether offset/limit paging has a total-count companion. Adequate but not rich beyond the annotations.

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, zero filler: the first states what it does and the key identifier, the second routes to alternatives. Capability and routing are front-loaded with no redundant restatement of the 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?

With no output schema, the description could have said what a query returns (rows/records, paging metadata), and that is its main remaining gap. Everything needed to select and invoke the tool correctly — source, identifier, filters, sorting, paging, and where to get the id — is present.

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 description coverage is 100% and every parameter carries its own description with examples, so the schema does the heavy lifting. The description restates the same behaviors (free-text q, exact-match filters, "field desc" sort, limit/offset) without adding format constraints, valid field names, or filter operator semantics. Baseline 3 applies.

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?

"Query any City of Toronto datastore resource (open.toronto.ca, CKAN) by its resource id (a UUID)" gives a specific verb, a specific resource, the source system, and the required identifier. It also names the two sibling tools it is not (toronto_datasets, toronto_recent), so an agent can distinguish it without opening any schema.

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 final sentence explicitly routes the agent: use toronto_datasets to obtain a resource id, or toronto_recent for common/prebuilt ones. Combined with the required resource_id, this makes the precondition for using this tool (you already have a UUID) unambiguous, implicitly telling the agent when not to use it.

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.