Skip to main content
Glama
jcscocca

socrata-mcp

by jcscocca

query

Query a Socrata dataset using structured SoQL parameters or a raw SoQL string. Returns matched rows, row count, and truncation status.

Instructions

Query a dataset with structured SoQL parameters OR one raw SoQL string.

Structured mode (recommended): pass any of select/where/group/order/ limit/offset plus optional geo filters. Raw mode: pass soql only (e.g. "SELECT offense, count(*) GROUP BY offense LIMIT 50").

Args: domain: Portal hostname, e.g. "data.seattle.gov". dataset_id: Socrata 4x4 id, e.g. "tazs-3rd5". select: Columns/expressions, e.g. ["offense", "count(*) as n"]. where: SoQL filter, e.g. "offense_date > '2026-06-01T00:00:00'". group: GROUP BY columns (pair with aggregate select expressions). order: e.g. "offense_date DESC". Defaults to ":id" for stable paging. limit: Max rows returned (default 100, hard cap applies). offset: Row offset for pagination. soql: Raw SoQL query — mutually exclusive with all structured params. within_circle: {field, lat, lon, radius_m} geo filter on a point column. within_box: {field, nw_lat, nw_lon, se_lat, se_lon} geo filter.

Returns: {rows, row_count, truncated, query: {params, effective_limit, clamped}}. truncated: true means more rows matched than were returned — narrow the query or use export_csv for bulk extraction.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
soqlNo
groupNo
limitNo
orderNo
whereNo
domainYes
offsetNo
selectNo
dataset_idYes
within_boxNo
within_circleNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior5/5

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

No annotations are provided, so the description carries full burden. It discloses truncation behavior, default ordering for stable paging, mutual exclusivity of soql and structured params, hard cap on limit, and return format. This is comprehensive for behavioral transparency.

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?

The description is fairly long but well-structured: intro, two modes, parameter list, return format. It is front-loaded and each sentence adds value. Slightly verbose but justified due to 11 parameters.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given 11 parameters, no annotations, and an output schema, the description covers input and output comprehensively. It explains pagination, truncation, default ordering, and mutual exclusion, leaving no obvious gaps for an agent to use the tool correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, but the description provides detailed explanations and examples for each parameter (e.g., domain with example domain, select with example expressions). This adds significant meaning beyond the schema's property titles, fully compensating for lack of schema descriptions.

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?

The description clearly states the tool queries a dataset using either structured SoQL parameters or a raw SoQL string. It specifies the verb 'Query' and the resource 'dataset', and distinguishes two modes. This is specific and helpful.

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?

The description recommends structured mode and explains when to use raw mode. It also suggests using export_csv for bulk extraction when truncated. However, it does not explicitly contrast with other sibling tools like sample or get_dataset, which would provide clearer usage boundaries.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/jcscocca/socrata-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server