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, last-updated timestamp, and, for a filter, the dataset it is a view of — with the period and area it covers, how often it is updated, its suggested citation, license, and attribution wherever the publisher recorded them. A chart or map has no schema of its own; the failure names the dataset it is built on. Returns the first 100 columns by default; wide datasets continue via column_offset. The dataset description is capped at 4,000 characters by default; pass full_description: true for the whole text. Get dataset IDs from cdc_discover_datasets.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "datasetId": "<datasetId>"
    },
    "name": "cdc_get_dataset_schema"
  }
}

Input 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). 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 — a value at or above the column count returns every column.
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.
full_descriptionNoReturn the dataset description whole (default false). By default a description longer than 4,000 characters is cut there, and the response sets descriptionTruncated and descriptionLength. Column descriptions are never shortened either way.

Output 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.
licenseNoName of the license the dataset is published under — publisher-written text in no fixed format ("Public Domain U.S. Government", "Open Data Commons Attribution License"). Absent when the publisher named none.
citationNoHow the publisher asks the dataset to be cited — publisher-written text in no fixed format, placeholders such as "[Last accessed date]" included. Absent when the publisher recorded none.
parentIdNoFour-by-four ID of the dataset this asset is a view of — set on a filter, naming the dataset it was derived from. Absent on a dataset in its own right.
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.
attributionNoThe office the publisher credits for the dataset — publisher-written text in no fixed format ("National Center for Health Statistics"). Absent when the publisher recorded none.
descriptionNoDataset description when provided, as plain text — markup stripped and entity references decoded. Capped at 4,000 characters by default and ending in "…" when cut, with descriptionTruncated and descriptionLength set; pass full_description: true for the whole text. Column descriptions are never shortened.
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.
updateFrequencyNoHow often the publisher updates the dataset — publisher-written text in no fixed format ("R/P1M", "Weekly", "irregular", "No longer updated (dataset archived)"). Absent when the publisher recorded none; updatedAt is when the data last changed, which alone does not tell a monthly series from a closed one.
temporalCoverageNoPeriod the data covers — publisher-written text in no fixed format, relayed as written ("2015-01-01/2026-05-31", "1999/2018", "2019/present", "N/A"). Absent when the publisher recorded none.
descriptionLengthNoCharacter count of the whole description, present only when description was cut. Call again with full_description: true to read all of it.
geographicCoverageNoArea the data covers — publisher-written text in no fixed format ("United States", "50 states and District of Columbia"). Absent when the publisher recorded none.
descriptionTruncatedNoTrue when description was cut at the 4,000-character cap. Absent means description is the whole text.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed8 schema fields changed
    • addedOutput schema / properties / attribution
      Added value: +{
      +  "description": "The office the publisher credits for the dataset — publisher-written text in no fixed format (\"National Center for Health Statistics\"). Absent when the publisher recorded none.",
      +  "type": "string"
      +}
    • addedOutput schema / properties / citation
      Added value: +{
      +  "description": "How the publisher asks the dataset to be cited — publisher-written text in no fixed format, placeholders such as \"[Last accessed date]\" included. Absent when the publisher recorded none.",
      +  "type": "string"
      +}
    • changedOutput schema / properties / error / properties / data / properties / reason / description
      Previous value: -"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."New value: +"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, could not be reached, did not finish answering within 20 seconds, or answered with a body that is not the JSON it serves. Other values are possible when a failure originates below the handler."
    • addedOutput schema / properties / geographicCoverage
      Added value: +{
      +  "description": "Area the data covers — publisher-written text in no fixed format (\"United States\", \"50 states and District of Columbia\"). Absent when the publisher recorded none.",
      +  "type": "string"
      +}
    • addedOutput schema / properties / license
      Added value: +{
      +  "description": "Name of the license the dataset is published under — publisher-written text in no fixed format (\"Public Domain U.S. Government\", \"Open Data Commons Attribution License\"). Absent when the publisher named none.",
      +  "type": "string"
      +}
    • addedOutput schema / properties / parentId
      Added value: +{
      +  "description": "Four-by-four ID of the dataset this asset is a view of — set on a filter, naming the dataset it was derived from. Absent on a dataset in its own right.",
      +  "type": "string"
      +}
    • addedOutput schema / properties / temporalCoverage
      Added value: +{
      +  "description": "Period the data covers — publisher-written text in no fixed format, relayed as written (\"2015-01-01/2026-05-31\", \"1999/2018\", \"2019/present\", \"N/A\"). Absent when the publisher recorded none.",
      +  "type": "string"
      +}
    • addedOutput schema / properties / updateFrequency
      Added value: +{
      +  "description": "How often the publisher updates the dataset — publisher-written text in no fixed format (\"R/P1M\", \"Weekly\", \"irregular\", \"No longer updated (dataset archived)\"). Absent when the publisher recorded none; updatedAt is when the data last changed, which alone does not tell a monthly series from a closed one.",
      +  "type": "string"
      +}
  2. Changed6 schema fields changed
    • changedInput schema / properties / column_limit / description
      Previous value: -"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."New value: +"Columns to return in this call (default 100). 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 — a value at or above the column count returns every column."
    • changedInput schema / properties / column_limit / maximum
      Previous value: -500New value: +9007199254740991
    • addedInput schema / properties / full_description
      Added value: +{
      +  "default": false,
      +  "description": "Return the dataset description whole (default false). By default a description longer than 4,000 characters is cut there, and the response sets descriptionTruncated and descriptionLength. Column descriptions are never shortened either way.",
      +  "type": "boolean"
      +}
    • changedOutput schema / properties / description / description
      Previous 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."New value: +"Dataset description when provided, as plain text — markup stripped and entity references decoded. Capped at 4,000 characters by default and ending in \"…\" when cut, with descriptionTruncated and descriptionLength set; pass full_description: true for the whole text. Column descriptions are never shortened."
    • addedOutput schema / properties / descriptionLength
      Added value: +{
      +  "description": "Character count of the whole description, present only when description was cut. Call again with full_description: true to read all of it.",
      +  "type": "number"
      +}
    • addedOutput schema / properties / descriptionTruncated
      Added value: +{
      +  "description": "True when description was cut at the 4,000-character cap. Absent means description is the whole text.",
      +  "type": "boolean"
      +}
  3. 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"
      +}
  4. 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"
      -]
  5. 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"
      +]
  6. 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."
  7. 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"
      +}
  8. 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\")."
  9. Changed1 schema field changed
    • addedOutput schema / properties / columns / items / description
      Added value: +"A single column in the dataset schema."
  10. 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"
      +]
  11. First observed

TDQS

A4.4/5.0
Behavior5/5

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

Adds substantial behavior beyond the readOnly annotation: default column limit and pagination via column_offset, dataset-description truncation at 4,000 characters with full_description override, and chart/map failure behavior that names the underlying dataset.

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 purpose and covers the important behaviors efficiently. It is somewhat dense and repeats schema-level details such as the 100-column default and full_description flag, but the length is justified by the tool's complexity.

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 an output schema and readOnly annotation, the description still supplies the operationally important context an agent needs: ID source, pagination, truncation, and the chart/map failure mode. Nothing essential is missing.

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 description coverage is 100%, so the schema already explains domain, datasetId, column_limit, column_offset, and full_description in detail. The description reinforces pagination and truncation behavior but adds little parameter meaning beyond what the schema provides.

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?

States a specific verb and resource: fetch the column schema for a CDC dataset. It also clarifies metadata returned, the chart/map exception, and names cdc_discover_datasets as the source of dataset IDs, distinguishing it clearly from sibling discovery/query tools.

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?

Gives clear usage context: call this to inspect a dataset's schema and metadata, obtain IDs via cdc_discover_datasets, and expect a failure when passing a chart or map instead of a dataset. It does not explicitly contrast with cdc_query_dataset, but the intended use is clear.

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.