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. 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.

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). 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

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, 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.
descriptionLengthNoCharacter count of the whole description, present only when description was cut. Call again with full_description: true to read all of it.
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. 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"
      +}
  2. 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"
      +}
  3. 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"
      -]
  4. 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"
      +]
  5. 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."
  6. 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"
      +}
  7. 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\")."
  8. Changed1 schema field changed
    • addedOutput schema / properties / columns / items / description
      Added value: +"A single column in the dataset schema."
  9. 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"
      +]
  10. First observed

TDQS

A4.3/5.0
Behavior4/5

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

readOnlyHint=true already declares the safety profile, so the bar is lower. The description still adds real behavioral context beyond the annotations: a 100-column default window, column_offset continuation for wide datasets, and a 4,000-character default cap on the dataset description with the full_description escape hatch.

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?

Four dense sentences, each earning its place: purpose first, then the two behavioral caveats (pagination, truncation), then the ID source. No filler and the most important constraint is front-loaded.

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?

With an output schema present, return values need no explanation, and the description covers the operational gaps an agent needs — default window size, continuation, and description truncation. Nothing required to invoke it correctly 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 documents domain, column_limit, column_offset, and full_description in detail. The description restates the defaults at a higher level but adds no syntax or format detail beyond what the schema provides, so the baseline 3 applies.

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 opens with a specific verb and resource ('Fetch the column schema for a CDC dataset') and enumerates exactly what is returned (names, data types, descriptions, row count, last-updated). It distinguishes itself from the data-returning sibling cdc_query_dataset and routes to cdc_discover_datasets for IDs.

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 supplies a clear prerequisite ('Get dataset IDs from cdc_discover_datasets') and context for use, and the pagination/truncation notes imply the workflow for wide datasets. It stops short of explicitly stating when to prefer this over cdc_query_dataset or cdc_list_catalog_vocabulary, so no exclusions are given.

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.