The task
How can an analyst ask questions about NYC 311 requests and receive inspectable summaries, geographic results, and reusable data?
My solution
I built a query service that turns structured analytical requests into filtered records, grouped statistics, geographic queries, period comparisons, and recoverable CSV exports.
A conversational agent selects tools; the service owns the calculations. The same request contract works with a small local fixture and an Elasticsearch adapter. Explicit dataset definitions, query records, and export metadata make each answer inspectable.
How it works
Python · MCP · Elasticsearch adapter · CSV- 01
Define
Inspect the dataset catalog and choose fields, filters, and a grouping.
- 02
Calculate
Execute the request through the analytical service, with geography and time handled explicitly.
- 03
Reuse
Inspect the result, save the query, or export records with recovery checkpoints.
Try it
Interactive browser demonstrationInteractive browser demo
Ask a smaller citywide question
Filter service requests and watch the counts, closure rate, and measured closure times change together.
Loading the bundled evidence…
Methods / evidence / reproduction
Read the research.
The browser example calculates directly over the project’s 32-record synthetic fixture. The source documents seven MCP tools and versioned checks for query execution, export recovery, and resource guards.
The paper connects the research question to the implementation, worked examples, and evidence. The project directory includes the runnable software, documentation, and tests.