Skip to main content
Glama

socrata-mcp-server

Get Dataset Schema

socrata_get_dataset
Read-onlyIdempotent

Fetch full metadata and column schema for a Socrata dataset by ID. Returns field names, data types, descriptions, row count, and licensing. Always call this before writing a socrata_query_dataset — the column types determine correct WHERE clause syntax: Number columns accept bare literals (year=2023) while Text columns require single-quoted strings (year='2023').

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
domainNoPortal domain (e.g. data.seattle.gov). Defaults to SOCRATA_DEFAULT_DOMAIN env var or data.seattle.gov.
dataset_idYesFour-by-four dataset ID matching pattern like kzjm-xkqj. Obtain from socrata_find_datasets.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameNoDataset display name.
tagsNoAssociated tags.
errorNoPresent when the call failed. Absent on success.
domainNoPortal domain hosting this dataset.
columnsNoColumn schema. Computed region columns (:@computed_region_*) are excluded to reduce noise.
licenseNoLicense name when available.
categoryNoDomain category when available.
row_countNoApproximate row count when available. See row_count_source for provenance.
dataset_idNoFour-by-four dataset ID.
descriptionNoDataset description when available.
data_updated_atNoISO 8601 timestamp of last data update when available.
row_count_sourceNoHow row_count was obtained: 'top_level_cached_contents' — reported directly by the portal's views metadata; 'column_cached_contents' — derived as the maximum per-column cached count when the top-level value is absent. Absent when row_count is absent.

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already mark the operation read-only and idempotent, and the description adds behavioral context: it returns field names, types, descriptions, row count, and licensing, and warns about literal quoting conventions. No contradiction.

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 with a front-loaded purpose and a focused syntax example; no filler.

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?

The description covers the call's purpose, prerequisite (dataset_id), result contents, and its role feeding socrata_query_dataset. With an output schema present, return-value details are appropriately left to the schema; it could mention dataframe siblings, but that is not essential.

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?

Input schema is 100% covered, with dataset_id describing the ID pattern and source and domain documenting its default. The description reinforces the ID-based lookup but does not need to add parameter-level detail beyond the schema.

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?

Clearly identifies the operation (fetch metadata/schema by ID) and the resource (Socrata dataset), and differentiates from query tools by focusing on schema rather than rows. The references to column types and WHERE syntax make its role unambiguous.

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?

Explicitly directs agents to call it before socrata_query_dataset and explains why; it also references socrata_find_datasets as the source of dataset_id in the schema. This is strong when-to-use guidance.

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.

TDQS

A4.7/5.0
Disambiguation5/5

Each tool has a distinct role: discovery (list_portals), search (find_datasets), metadata (get_dataset), query (query_dataset), and post-query analysis (dataframe_describe and dataframe_query). The only potential overlap is between find_datasets and get_dataset, but they are clearly separated by preview vs full schema.

Naming Consistency5/5

All tools follow a consistent 'socrata_<verb>_<noun>' pattern (e.g., socrata_find_datasets, socrata_get_dataset). The dataframe tools extend with a clear prefix (socrata_dataframe_describe/query), maintaining the pattern and clarity.

Tool Count5/5

With 6 tools, the server covers the full discovery-to-query workflow without excess. Each tool serves a necessary step in the pipeline, from portal selection to result analysis, and the count feels well-scoped for a data access tool.

Completeness5/5

The surface covers the entire lifecycle: discover portals, search datasets, fetch metadata, execute queries, and handle large results via DataCanvas spill. There are no obvious gaps for the stated purpose of querying Socrata open-data portals.