Skip to main content
Glama
jcscocca

socrata-mcp

by jcscocca

export_csv

Export query results from a Socrata dataset to a CSV file. Supports filtering, grouping, sorting, and spatial queries for Tableau-ready output.

Instructions

Export query results to a Tableau-ready CSV via streamed, paged download.

Accepts the same query parameters as query (structured or raw soql) and writes matching rows to out_path. Designed to chain into vizforge's csv_to_dashboard. Point/location values are serialized as JSON strings.

Args: domain: Portal hostname, e.g. "data.seattle.gov". dataset_id: Socrata 4x4 id, e.g. "tazs-3rd5". out_path: Destination .csv path (parent directories are created). select/where/group/order/limit/soql/within_circle/within_box: as in query. max_rows: Safety cap for this export (default 1,000,000).

Returns: {path, rows_written, truncated, columns, notes}.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
soqlNo
groupNo
limitNo
orderNo
whereNo
domainYes
selectNo
max_rowsNo
out_pathYes
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 the full burden. It discloses details: streamed/paged download, writes to out_path, parent directories created, max_rows safety cap (default 1M), and point/location serialization as JSON strings. The return value structure is also described, providing complete 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 front-loaded with the main purpose and is fairly concise. The Args section is a bit verbose but still functional. Every sentence adds value, though the parameter list could be more succinct by relying on the schema.

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?

Given the complexity (12 params, 0% schema coverage, no annotations, but an output schema exists), the description covers purpose, usage, behavioral traits, and return structure. It references another tool for query parameters, which is acceptable but requires the agent to understand `query`. Overall, it is complete enough for correct usage.

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

Parameters2/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 lists parameters and refers to `query` for most, but provides no individual descriptions or syntax beyond examples (e.g., domain and dataset_id examples). This is insufficient for an agent to understand parameter meanings without prior knowledge.

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 exports query results to a Tableau-ready CSV via streamed download, distinguishing it from sibling tools like `query` which likely returns JSON. It specifies the output is a file and mentions chaining into vizforge.

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 indicates that the tool accepts the same query parameters as `query` and is designed for chaining into `csv_to_dashboard`, which provides context on when to use it. However, it does not explicitly state when not to use or provide alternatives, though the sibling list and purpose imply differentiation.

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