Skip to main content
Glama

Edmonton Query

edmonton_query
Read-onlyIdempotent

Run a raw SoQL query against any Edmonton open-data resource (data.edmonton.ca) by its Socrata id (8-char like "ukww-xkmj"). Full SoQL: where/select/group/order/limit/offset. Use edmonton_datasets to find a resource id, or edmonton_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": {
      "where": "incident_year=2025",
      "_apiKey": "your-data-edmonton-api-key",
      "resource_id": "ukww-xkmj"
    },
    "name": "edmonton_query"
  }
}

Input Schema

NameRequiredDescriptionDefault
groupNoSoQL $group (e.g. "incident_category").
limitNoMax rows (default 100, max 5000).
orderNoSoQL $order (e.g. "incident_datetime DESC").
whereNoSoQL $where filter (e.g. "incident_year=2025").
offsetNoRow offset for paging.
selectNoSoQL $select (e.g. "incident_category, count(*)").
_apiKeyNoOptional, your own Socrata app token for higher rate limits. Omit to use the keyless endpoint.
resource_idYesSocrata resource id, e.g. "ukww-xkmj" (police incidents).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / _apiKey / description
      Previous value: -"Optional — your own Socrata app token for higher rate limits. Omit to use the keyless endpoint."New value: +"Optional, your own Socrata app token for higher rate limits. Omit to use the keyless endpoint."
  2. Changed1 schema field changed
    • addedInput schema / examples
      Added value: +[
      +  {
      +    "_apiKey": "your-data-edmonton-api-key",
      +    "resource_id": "ukww-xkmj",
      +    "where": "incident_year=2025"
      +  },
      +  {
      +    "_apiKey": "your-data-edmonton-api-key",
      +    "group": "incident_category",
      +    "limit": 10,
      +    "order": "count(*) DESC",
      +    "resource_id": "ukww-xkmj",
      +    "select": "incident_category, count(*)"
      +  }
      +]
  3. First observed

TDQS

A4/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true, idempotentHint=true, openWorldHint=true and destructiveHint=false, so the safety profile is covered. The description adds the SoQL feature scope (where/select/group/order/limit/offset) and frames it as a 'raw' query, but says nothing about return shape, error behaviour, or rate limits — the rate-limit context sits only in the _apiKey parameter description, not the tool description.

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, front-loaded with the core action and followed by the routing hint. No filler and nothing repeated from the schema 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?

For an eight-parameter raw-query tool with no output schema, the description covers the query surface and how to obtain the required resource_id. The remaining gap is the absence of any statement about what comes back (rows/JSON, error on invalid SoQL, paging limits), which matters more here because there is no output schema to fall back on.

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%, so every one of the eight parameters is already documented with examples and defaults (limit default 100, max 5000). The description restates the clause names but adds no syntax rules, valid-value constraints, or interaction between parameters, so baseline 3 is appropriate.

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?

States a specific verb and resource — 'run a raw SoQL query against any Edmonton open-data resource (data.edmonton.ca) by its Socrata id' — and disambiguates from siblings by pointing to edmonton_datasets for id lookup and edmonton_recent for common resources. An agent can tell exactly what this tool does and what it is not.

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?

Names two alternatives with the condition that selects them: use edmonton_datasets to find a resource id, or edmonton_recent for common resources. It stops short of an explicit exclusion (e.g., 'do not use this for simple keyword search' or 'prefer edmonton_recent unless you need custom SoQL'), so the routing advice is clear but not exhaustive.

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.