Skip to main content
Glama

Cdc Get Dataset Schema

cdc_get_dataset_schema
Read-only

Fetch the column schema for a CDC dataset — names, data types, descriptions, row count, and last-updated timestamp. Returns the first 100 columns by default; wide datasets continue via column_offset. Get dataset IDs from cdc_discover_datasets.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
domainNoCDC Socrata host to fetch the dataset from. "data.cdc.gov" (default) and "chronicdata.cdc.gov" front the same catalog, so a four-by-four ID resolves on either and the default works whichever host the dataset was found on.data.cdc.gov
datasetIdYesFour-by-four dataset identifier (e.g., "bi63-dtpu"). Obtain from cdc_discover_datasets.
column_limitNoColumns to return in this call (default 100, max 500). Every dataset under the default arrives whole; past it the response reports totalCount and a nextOffset to pass back as column_offset. Raise this to pull a wide schema in one call.
column_offsetNoIndex of the first column to return, for continuing past a previous call (default 0). Columns keep the order the dataset declares, so column_offset plus column_limit walks the schema without gaps or repeats. An offset at or past the column count returns an empty window rather than an error.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
capNoThe column_limit that bounded this response.
nameNoDataset display name from the catalog (e.g., "Provisional COVID-19 Deaths by Sex and Age").
errorNoPresent when the call failed. Absent on success.
shownNoNumber of columns returned in this response.
noticeNoGuidance when the response is a subset of the schema — which columns it covers, how to reach the rest, or that column_offset ran past the end.
columnsNoThe requested window of dataset columns, with full types and descriptions. Bounded by column_limit/column_offset; the enrichment fields say how the window sits in the whole schema.
rowCountNoTotal rows in the dataset; omitted when neither a live nor a cached figure is available. Read rowCountSource before sizing a pagination walk against it — the cached figure can understate an actively-updated dataset by a third or more.
truncatedNoTrue when the returned columns are a subset of the schema. Absent means every column of the dataset is in this response.
updatedAtNoLast data update timestamp when provided.
nextOffsetNoValue to pass as column_offset on the next call to continue after the last column returned. Present only when columns remain beyond this window.
totalCountNoTotal columns in the dataset schema, before column_limit/column_offset.
descriptionNoDataset description when provided, in full as plain text — markup stripped and entity references decoded. Never truncated here; cdc_discover_datasets is the surface that shortens it.
rowCountSourceNoProvenance of rowCount. "live" is a count(*) run against the dataset for this call. "cached" is the figure Socrata stored when it last built its column cache, returned when the count request did not succeed; Socrata does not refresh it as rows land. Absent exactly when rowCount is absent.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changed
    • changedOutput schema / properties / description / description
      Previous value: -"Dataset description when provided."New value: +"Dataset description when provided, in full as plain text — markup stripped and entity references decoded. Never truncated here; cdc_discover_datasets is the surface that shortens it."
    • changedOutput schema / properties / rowCount / description
      Previous value: -"Total number of rows when reported by upstream; omitted when unknown."New value: +"Total rows in the dataset; omitted when neither a live nor a cached figure is available. Read rowCountSource before sizing a pagination walk against it — the cached figure can understate an actively-updated dataset by a third or more."
    • addedOutput schema / properties / rowCountSource
      Added value: +{
      +  "description": "Provenance of rowCount. \"live\" is a count(*) run against the dataset for this call. \"cached\" is the figure Socrata stored when it last built its column cache, returned when the count request did not succeed; Socrata does not refresh it as rows land. Absent exactly when rowCount is absent.",
      +  "enum": [
      +    "live",
      +    "cached"
      +  ],
      +  "type": "string"
      +}
  2. Changed6 schema fields changed
    • changedInput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
    • addedInput schema / additionalProperties
      Added value: +false
    • changedOutput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
    • addedOutput schema / anyOf
      Added value: +[
      +  {
      +    "not": {
      +      "required": [
      +        "error"
      +      ]
      +    },
      +    "required": [
      +      "name",
      +      "columns",
      +      "totalCount"
      +    ]
      +  },
      +  {
      +    "required": [
      +      "error"
      +    ]
      +  }
      +]
    • addedOutput schema / properties / error
      Added value: +{
      +  "additionalProperties": {},
      +  "description": "Present when the call failed. Absent on success.",
      +  "properties": {
      +    "code": {
      +      "description": "JSON-RPC error code for this failure.",
      +      "maximum": 9007199254740991,
      +      "minimum": -9007199254740991,
      +      "type": "integer"
      +    },
      +    "data": {
      +      "additionalProperties": {},
      +      "properties": {
      +        "reason": {
      +          "description": "Machine-readable failure mode. Declared by this tool: `dataset_not_found`: Dataset ID does not exist or has been retired. `not_queryable`: The ID names a catalog asset with no columns — a chart, map, story, file, or external link rather than a tabular dataset. `access_denied`: Socrata returned 403 — the asset is not readable through this endpoint or access is restricted. `invalid_query`: Socrata rejected the metadata request with a 400. `rate_limited`: Socrata API returns 429 Too Many Requests. `upstream_error`: Socrata metadata API returned a 5xx server error. Other values are possible when a failure originates below the handler.",
      +          "examples": [
      +            "dataset_not_found",
      +            "not_queryable",
      +            "access_denied",
      +            "invalid_query",
      +            "rate_limited",
      +            "upstream_error"
      +          ],
      +          "type": "string"
      +        },
      +        "recovery": {
      +          "additionalProperties": {},
      +          "description": "Actionable next step for the caller.",
      +          "properties": {
      +            "hint": {
      +              "type": "string"
      +            }
      +          },
      +          "required": [
      +            "hint"
      +          ],
      +          "type": "object"
      +        },
      +        "retryable": {
      +          "description": "Whether retrying may succeed.",
      +          "type": "boolean"
      +        }
      +      },
      +      "type": "object"
      +    },
      +    "message": {
      +      "description": "Human-readable description of what went wrong.",
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "code",
      +    "message"
      +  ],
      +  "type": "object"
      +}
    • removedOutput schema / required
      Removed value: -[
      -  "name",
      -  "columns",
      -  "totalCount"
      -]
  3. Changed10 schema fields changed
    • addedInput schema / properties / column_limit
      Added value: +{
      +  "default": 100,
      +  "description": "Columns to return in this call (default 100, max 500). Every dataset under the default arrives whole; past it the response reports totalCount and a nextOffset to pass back as column_offset. Raise this to pull a wide schema in one call.",
      +  "maximum": 500,
      +  "minimum": 1,
      +  "type": "integer"
      +}
    • addedInput schema / properties / column_offset
      Added value: +{
      +  "default": 0,
      +  "description": "Index of the first column to return, for continuing past a previous call (default 0). Columns keep the order the dataset declares, so column_offset plus column_limit walks the schema without gaps or repeats. An offset at or past the column count returns an empty window rather than an error.",
      +  "maximum": 10000,
      +  "minimum": 0,
      +  "type": "integer"
      +}
    • addedOutput schema / properties / cap
      Added value: +{
      +  "description": "The column_limit that bounded this response.",
      +  "type": "number"
      +}
    • changedOutput schema / properties / columns / description
      Previous value: -"Dataset columns with types and descriptions."New value: +"The requested window of dataset columns, with full types and descriptions. Bounded by column_limit/column_offset; the enrichment fields say how the window sits in the whole schema."
    • addedOutput schema / properties / nextOffset
      Added value: +{
      +  "description": "Value to pass as column_offset on the next call to continue after the last column returned. Present only when columns remain beyond this window.",
      +  "type": "number"
      +}
    • addedOutput schema / properties / notice
      Added value: +{
      +  "description": "Guidance when the response is a subset of the schema — which columns it covers, how to reach the rest, or that column_offset ran past the end.",
      +  "type": "string"
      +}
    • addedOutput schema / properties / shown
      Added value: +{
      +  "description": "Number of columns returned in this response.",
      +  "type": "number"
      +}
    • addedOutput schema / properties / totalCount
      Added value: +{
      +  "description": "Total columns in the dataset schema, before column_limit/column_offset.",
      +  "type": "number"
      +}
    • addedOutput schema / properties / truncated
      Added value: +{
      +  "description": "True when the returned columns are a subset of the schema. Absent means every column of the dataset is in this response.",
      +  "type": "boolean"
      +}
    • changedOutput schema / required
      Previous value: -[
      -  "name",
      -  "columns"
      -]New value: +[
      +  "name",
      +  "columns",
      +  "totalCount"
      +]
  4. Changed1 schema field changed
    • changedInput schema / properties / domain / description
      Previous value: -"CDC Socrata portal hosting the dataset. Use the same portal you found the dataset on via cdc_discover_datasets: \"data.cdc.gov\" (default) or \"chronicdata.cdc.gov\"."New value: +"CDC Socrata host to fetch the dataset from. \"data.cdc.gov\" (default) and \"chronicdata.cdc.gov\" front the same catalog, so a four-by-four ID resolves on either and the default works whichever host the dataset was found on."
  5. Changed1 schema field changed
    • addedInput schema / properties / domain
      Added value: +{
      +  "default": "data.cdc.gov",
      +  "description": "CDC Socrata portal hosting the dataset. Use the same portal you found the dataset on via cdc_discover_datasets: \"data.cdc.gov\" (default) or \"chronicdata.cdc.gov\".",
      +  "enum": [
      +    "data.cdc.gov",
      +    "chronicdata.cdc.gov"
      +  ],
      +  "type": "string"
      +}
  6. Changed1 schema field changed
    • changedOutput schema / properties / name / description
      Previous value: -"Dataset name."New value: +"Dataset display name from the catalog (e.g., \"Provisional COVID-19 Deaths by Sex and Age\")."
  7. Changed1 schema field changed
    • addedOutput schema / properties / columns / items / description
      Added value: +"A single column in the dataset schema."
  8. Changed6 schema fields changed
    • changedOutput schema / properties / columns / items / properties / description / description
      Previous value: -"Column description."New value: +"Column description when provided."
    • changedOutput schema / properties / columns / items / required
      Previous value: -[
      -  "fieldName",
      -  "dataType",
      -  "description"
      -]New value: +[
      +  "fieldName",
      +  "dataType"
      +]
    • changedOutput schema / properties / description / description
      Previous value: -"Dataset description."New value: +"Dataset description when provided."
    • changedOutput schema / properties / rowCount / description
      Previous value: -"Total number of rows in the dataset."New value: +"Total number of rows when reported by upstream; omitted when unknown."
    • changedOutput schema / properties / updatedAt / description
      Previous value: -"Last data update timestamp."New value: +"Last data update timestamp when provided."
    • changedOutput schema / required
      Previous value: -[
      -  "name",
      -  "description",
      -  "rowCount",
      -  "updatedAt",
      -  "columns"
      -]New value: +[
      +  "name",
      +  "columns"
      +]
  9. First observed

TDQS

A4.3/5.0
Behavior4/5

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

With readOnlyHint already annotating safety, the description adds useful operational behavior: default 100-column window, continuation via column_offset, and inclusion of row count/last-updated timestamp. It does not contradict the annotations and goes beyond a bare read-only declaration.

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?

Three tight sentences: main capability first, pagination behavior second, ID provenance last. No filler or repeated annotation content.

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?

For a read-only schema inspection tool, the description plus the rich input schema, output schema, and readOnlyHint fully cover what an agent needs to select and invoke it correctly, including pagination and how to obtain dataset IDs.

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 coverage is 100% and each parameter already has a detailed description, so the tool description adds little parameter-level meaning; the pagination summary and cdc_discover_datasets pointer mostly restate schema text. Baseline 3 is appropriate because the schema does the heavy lifting.

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 names a specific verb (Fetch), a specific resource (column schema for a CDC dataset), and enumerates the returned content (names, data types, descriptions, row count, last-updated timestamp). This clearly distinguishes it from sibling tools like cdc_discover_datasets (ID discovery) and cdc_query_dataset (row data).

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?

It gives a clear usage context: use it to obtain a dataset's schema after discovering dataset IDs, and it explicitly routes ID lookup to cdc_discover_datasets. It does not explicitly enumerate when-not conditions relative to cdc_query_dataset, but the schema-vs-rows distinction is implied by the purpose statement.

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.