Skip to main content
Glama
cambridge-open-data-ma-mcp

cambridge-open-data-ma-mcp

by ali5ter

query

Run DuckDB SELECT statements over cached Cambridge open-data views to join and aggregate across datasets, using TRY_CAST for numeric fields and normalized join keys.

Instructions

Run a DuckDB SELECT over the cached datasets, exposed as one SQL view per dataset named ds_<id_with_underscores> (e.g. ixg8-tyau -> ds_ixg8_tyau). This is the cross-referencing step: join/aggregate across ds_* views. Every Socrata column is a string -- use TRY_CAST(col AS DOUBLE) for numeric work, and expect join keys (e.g. department names) to need normalization before they line up. NOTE: runs arbitrary SQL over local Parquet only; a trusted single-user tool, not sandboxed. Prefer describe_dataset + coverage_audit first so you know the fields exist and are fully populated.

Input Schema

NameRequiredDescriptionDefault
sqlYes
limitNo

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.5/5.0
Behavior5/5

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

With no annotations, the description carries the full burden and does so well: it discloses that it runs arbitrary SQL over local Parquet only, is a trusted single-user tool and not sandboxed. It also warns that every Socrata column is a string, requiring TRY_CAST for numeric work, and that join keys need normalization — behavioral context an agent cannot get from the schema.

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

Conciseness4/5

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

Front-loaded with the core action and view-naming rule, then caveats and prerequisites. Dense but nearly every clause carries operational value; the parenthetical example and casting note are well placed. Minor redundancy in the closing prerequisite note, but nothing that should be cut.

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?

Output schema exists, so return values needn't be explained, and the description covers the tricky parts: type coercion, join-key normalization, view naming, and the non-sandboxed trust model. The only real gap is the undocumented `limit` parameter, which matters for large result sets.

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 0%, so the description must compensate. It effectively documents the semantics of the `sql` parameter (SELECT-only, ds_* view namespace, string columns, TRY_CAST) but never mentions the `limit` parameter or its default of 1000, leaving one of two parameters undocumented.

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 DuckDB SELECT over the cached datasets') and immediately explains the ds_<id> view naming with a concrete example. It also signals its distinct role as the 'cross-referencing step' for joins/aggregation, which separates it from single-dataset siblings like fetch_dataset and describe_dataset.

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?

Gives explicit sequencing guidance ('Prefer describe_dataset + coverage_audit first so you know the fields exist and are fully populated') and names the exact scenario this tool is for: joining/aggregating across ds_* views. An agent knows both when to reach for it and which siblings to call before it.

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