cdc-health-mcp-server

Search and query CDC public health data — mortality, vaccinations, surveillance, behavioral risk.

使うべきか

品質と安全性

A
説明の品質
100%
スキーマの完全性
93%
命名の品質
80%
ポイズニングのリスク
100%
権限の一致
100%
プロトコルへの準拠
100%

ツール定義とプロトコルへの準拠に関する自動分析に基づいています。

コンテキストコスト

~10,493トークン数(ツール定義)
~24.3 KB一般的なレスポンスサイズ
注意への影響は大きい(128k コンテキストの 8.20%)

これは、サーバーのツールがモデルのコンテキストに読み込まれるたびに消費されるおおよそのトークン数です。数が多いほど、ほかのタスクに使える注意が減ります。

インストール

ワンクリックインストール

これを `claude_desktop_config.json` ファイルに追加してください:

{
  "mcpServers": {
    "cdc-health-mcp-server": {
      "command": "node",
      "args": [
        "@cyanheads/cdc-health-mcp-server"
      ]
    }
  }
}

実行可能なパッケージ

npm@cyanheads/cdc-health-mcp-server0.9.2streamable-http

リモートエンドポイント

https://cdc.caseyjhand.com/mcpstreamable-http

できること

ツール一覧

ツール(5)

🟢 読み取り専用🟡 書き込み🔴 削除⚪ 不明
🟢cdc_discover_datasets(domain, query, category, tags, limit, ...)

Search the CDC dataset catalog by keyword, category, or tag. Returns IDs, names, truncated descriptions, asset types, column counts, and update timestamps. The catalog also holds charts, maps, stories, files, and links; an entry whose columnCount is 0 is one of those and yields no data from the other tools. Use cdc_get_dataset_schema for the full column list of a chosen dataset.

入力スキーマ

{
  "type": "object",
  "properties": {
    "domain": {
      "default": "data.cdc.gov",
      "description": "CDC Socrata host to search. \"data.cdc.gov\" (default) and \"chronicdata.cdc.gov\" front the same catalog and return the same entries, so switching hosts neither widens nor narrows a search — chronic-disease and small-area collections such as PLACES, the Heart Disease & Stroke Atlas, and Environmental Public Health Tracking are found from either.",
      "type": "string",
      "enum": [
        "data.cdc.gov",
        "chronicdata.cdc.gov"
      ]
    },
    "query": {
      "description": "Full-text search across dataset names and descriptions (e.g., \"diabetes mortality\", \"lead exposure children\").",
      "type": "string"
    },
    "category": {
      "description": "Filter by domain category (e.g., \"NNDSS\", \"Vaccinations\", \"Behavioral Risk Factors\"). Values come from the catalog's own vocabulary and are matched exactly, including case — \"Vaccinations\" matches 89 entries while \"Vaccination\" matches none. Call cdc_list_catalog_vocabulary for every value with its entry count rather than guessing at one.",
      "type": "string"
    },
    "tags": {
      "description": "Filter by domain tags (e.g., [\"covid19\", \"surveillance\"]). Tags widen the search instead of narrowing it — a dataset matches when it carries any one of them, so every tag added returns more results, and an unrecognized tag matches nothing and leaves the result set unchanged. Values match the catalog's own tag vocabulary, case-insensitively; call cdc_list_catalog_vocabulary for the values in use with their entry counts, or read the tags field on any result. To narrow, combine tags with query or category, which intersect with the tag set.",
      "type": "array",
      "items": {
        "type": "string",
        "description": "Tag value"
      }
    },
    "limit": {
      "default": 10,
      "description": "Results to return (default 10, max 100). offset plus limit must not exceed 10000.",
      "type": "integer",
      "minimum": 1,
      "maximum": 100
    },
    "offset": {
      "default": 0,
      "description": "Pagination offset for browsing beyond first page (max 9999). offset plus limit must not exceed 10000; both CDC portals hold well under two thousand entries, so offsets near that ceiling page past the end of the catalog.",
      "type": "integer",
      "minimum": 0,
      "maximum": 9999
    },
    "order": {
      "default": "dataset_id",
      "description": "Result ordering. \"dataset_id\" (default) sorts deterministically by each dataset's unique catalog ID — required for stable offset pagination, since consecutive pages form a gap-free, duplicate-free traversal. \"relevance\" returns best-match ranking for keyword search but is not stably paginable across pages, so walking offsets can skip or repeat datasets.",
      "type": "string",
      "enum": [
        "dataset_id",
        "relevance"
      ]
    }
  },
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "additionalProperties": false
}

出力スキーマ

{
  "type": "object",
  "properties": {
    "datasets": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Four-by-four dataset identifier (e.g., \"bi63-dtpu\")."
          },
          "name": {
            "type": "string",
            "description": "Dataset display name from the catalog (e.g., \"Provisional COVID-19 Deaths by Sex and Age\")."
          },
          "description": {
            "description": "Dataset description when provided by the catalog, as plain text — markup stripped and entity references decoded — then truncated to 300 characters, so the limit bounds visible text. Fetch the full text via cdc_get_dataset_schema.",
            "type": "string"
          },
          "assetType": {
            "description": "Catalog asset type as Socrata reports it — \"dataset\", \"filter\", \"chart\", \"map\", \"story\", \"file\", or \"href\". Descriptive only: \"filter\" entries carry real columns and query normally, while \"chart\" and \"map\" entries do not. Read columnCount, not this field, to decide whether an entry is queryable.",
            "type": "string"
          },
          "category": {
            "description": "Domain category when provided.",
            "type": "string"
          },
          "tags": {
            "description": "Domain tags when provided.",
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "columnCount": {
            "description": "Number of columns in the dataset when reported by the catalog. A count of 0 means the entry is not tabular — cdc_get_dataset_schema and cdc_query_dataset return no usable data for it.",
            "type": "number"
          },
          "columnSample": {
            "description": "First 8 column field names as a preview. Call cdc_get_dataset_schema for the full column list with data types.",
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "updatedAt": {
            "description": "Last data update timestamp when provided.",
            "type": "string"
          },
          "pageViews": {
            "description": "Total page views when provided.",
            "type": "number"
          }
        },
        "required": [
          "id",
          "name"
        ],
        "additionalProperties": false,
        "description": "A single dataset catalog entry."
      },
      "description": "Matching datasets."
    },
    "totalCount": {
      "type": "number",
      "description": "Total matching datasets in the catalog (for pagination)."
    },
    "appliedFilters": {
      "type": "object",
      "properties": {
        "query": {
          "description": "Search query used.",
          "type": "string"
        },
        "category": {
          "description": "Category filter used.",
          "type": "string"
        },
        "tags": {
          "description": "Tag filters used — a dataset matched when it carried any one of them.",
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      },
      "additionalProperties": false,
      "description": "Filters applied to this query; absent fields indicate no filter on that dimension. Query, category, and tags intersect with each other, but multiple tags union."
    },
    "notice": {
      "description": "Guidance when the page came back empty — the catalog values closest to a category or tag filter that matched nothing, each with its entry count; how to broaden a search when no value is close; or the size of the result set when the offset ran past its end.",
      "type": "string"
    },
    "error": {
      "description": "Present when the call failed. Absent on success.",
      "type": "object",
      "properties": {
        "code": {
          "type": "integer",
          "minimum": -9007199254740991,
          "maximum": 9007199254740991,
          "description": "JSON-RPC error code for this failure."
        },
        "message": {
          "type": "string",
          "description": "Human-readable description of what went wrong."
        },
        "data": {
          "type": "object",
          "properties": {
            "reason": {
              "type": "string",
              "description": "Machine-readable failure mode. Declared by this tool: `rate_limited`: Socrata API returns 429 Too Many Requests. `dataset_not_found`: Socrata returned 404 for the catalog endpoint itself — the Discovery API address is wrong or the service moved. `access_denied`: Socrata returned 403 — the catalog refused this request rather than failing to serve it. `upstream_error`: Socrata catalog API returned a 5xx server error. `page_out_of_range`: offset plus limit exceeds 10000, which Socrata's catalog rejects outright. `invalid_query`: Catalog API returned 400 — typically a malformed query or invalid filter value. Other values are possible when a failure originates below the handler.",
              "examples": [
                "rate_limited",
                "dataset_not_found",
                "access_denied",
                "upstream_error",
                "page_out_of_range",
                "invalid_query"
              ]
            },
            "recovery": {
              "description": "Actionable next step for the caller.",
              "type": "object",
              "properties": {
                "hint": {
                  "type": "string"
                }
              },
              "required": [
                "hint"
              ],
              "additionalProperties": {}
            },
            "retryable": {
              "description": "Whether retrying may succeed.",
              "type": "boolean"
            }
          },
          "additionalProperties": {}
        }
      },
      "required": [
        "code",
        "message"
      ],
      "additionalProperties": {}
    }
  },
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "additionalProperties": false,
  "anyOf": [
    {
      "not": {
        "required": [
          "error"
        ]
      },
      "required": [
        "datasets",
        "totalCount",
        "appliedFilters"
      ]
    },
    {
      "required": [
        "error"
      ]
    }
  ]
}
🟢cdc_get_dataset_schema(domain, datasetId, column_limit, column_offset)

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.

入力スキーマ

{
  "type": "object",
  "properties": {
    "domain": {
      "default": "data.cdc.gov",
      "description": "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.",
      "type": "string",
      "enum": [
        "data.cdc.gov",
        "chronicdata.cdc.gov"
      ]
    },
    "datasetId": {
      "type": "string",
      "pattern": "^[a-z0-9]{4}-[a-z0-9]{4}$",
      "description": "Four-by-four dataset identifier (e.g., \"bi63-dtpu\"). Obtain from cdc_discover_datasets."
    },
    "column_limit": {
      "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.",
      "type": "integer",
      "minimum": 1,
      "maximum": 500
    },
    "column_offset": {
      "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.",
      "type": "integer",
      "minimum": 0,
      "maximum": 10000
    }
  },
  "required": [
    "datasetId"
  ],
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "additionalProperties": false
}

出力スキーマ

{
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "description": "Dataset display name from the catalog (e.g., \"Provisional COVID-19 Deaths by Sex and Age\")."
    },
    "description": {
      "description": "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.",
      "type": "string"
    },
    "rowCount": {
      "description": "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.",
      "type": "number"
    },
    "rowCountSource": {
      "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.",
      "type": "string",
      "enum": [
        "live",
        "cached"
      ]
    },
    "updatedAt": {
      "description": "Last data update timestamp when provided.",
      "type": "string"
    },
    "columns": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "fieldName": {
            "type": "string",
            "description": "Column field name (use in SoQL queries)."
          },
          "dataType": {
            "type": "string",
            "description": "Column data type (text, number, calendar_date, etc.)."
          },
          "description": {
            "description": "Column description when provided.",
            "type": "string"
          }
        },
        "required": [
          "fieldName",
          "dataType"
        ],
        "additionalProperties": false,
        "description": "A single column in the dataset schema."
      },
      "description": "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."
    },
    "totalCount": {
      "type": "number",
      "description": "Total columns in the dataset schema, before column_limit/column_offset."
    },
    "truncated": {
      "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"
    },
    "shown": {
      "description": "Number of columns returned in this response.",
      "type": "number"
    },
    "cap": {
      "description": "The column_limit that bounded this response.",
      "type": "number"
    },
    "nextOffset": {
      "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"
    },
    "notice": {
      "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"
    },
    "error": {
      "description": "Present when the call failed. Absent on success.",
      "type": "object",
      "properties": {
        "code": {
          "type": "integer",
          "minimum": -9007199254740991,
          "maximum": 9007199254740991,
          "description": "JSON-RPC error code for this failure."
        },
        "message": {
          "type": "string",
          "description": "Human-readable description of what went wrong."
        },
        "data": {
          "type": "object",
          "properties": {
            "reason": {
              "type": "string",
              "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"
              ]
            },
            "recovery": {
              "description": "Actionable next step for the caller.",
              "type": "object",
              "properties": {
                "hint": {
                  "type": "string"
                }
              },
              "required": [
                "hint"
              ],
              "additionalProperties": {}
            },
            "retryable": {
              "description": "Whether retrying may succeed.",
              "type": "boolean"
            }
          },
          "additionalProperties": {}
        }
      },
      "required": [
        "code",
        "message"
      ],
      "additionalProperties": {}
    }
  },
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "additionalProperties": false,
  "anyOf": [
    {
      "not": {
        "required": [
          "error"
        ]
      },
      "required": [
        "name",
        "columns",
        "totalCount"
      ]
    },
    {
      "required": [
        "error"
      ]
    }
  ]
}
🟢cdc_list_catalog_vocabulary(domain, filter, tag_limit, tag_offset)

List the controlled vocabularies cdc_discover_datasets' category and tags filters are matched against — every domain category and domain tag the CDC catalog publishes, each with the number of entries carrying it. Call it before filtering a search: a value the catalog does not carry matches nothing and returns an empty page, which is indistinguishable from a real value with no results. All 55 categories come back whole; the tag vocabulary runs to roughly 1,600 values, so tags are ranked by entry count and returned one page at a time via tag_limit and tag_offset. Pass filter to narrow both vocabularies to the values whose words contain it.

入力スキーマ

{
  "type": "object",
  "properties": {
    "domain": {
      "default": "data.cdc.gov",
      "description": "CDC Socrata host to read the vocabulary from. \"data.cdc.gov\" (default) and \"chronicdata.cdc.gov\" front the same catalog and publish the same vocabulary, so this selects which host answers, never which values exist.",
      "type": "string",
      "enum": [
        "data.cdc.gov",
        "chronicdata.cdc.gov"
      ]
    },
    "filter": {
      "description": "Narrow both vocabularies to the values related to this text. A value matches when every word of the filter appears inside one of its words (\"vaccin\" reaches \"Vaccinations\" and \"covid-19 vaccination\"), or when the whole value appears in the filter. Matching is not fuzzy — a misspelling returns nothing rather than a guess — and a filter under three letters is ignored.",
      "type": "string"
    },
    "tag_limit": {
      "default": 50,
      "description": "Tags to return in this call (default 50, max 500). Tags are ranked by entry count, so the default page is the most-used end of the vocabulary; the response reports how many matched and a nextOffset while more remain. Categories are never paged — all 55 arrive whole.",
      "type": "integer",
      "minimum": 1,
      "maximum": 500
    },
    "tag_offset": {
      "default": 0,
      "description": "Index of the first tag to return, for continuing past a previous call (default 0). Ranking is stable, so tag_offset plus tag_limit walks the vocabulary without gaps or repeats. An offset at or past the number of matching tags returns an empty tag list rather than an error.",
      "type": "integer",
      "minimum": 0,
      "maximum": 10000
    }
  },
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "additionalProperties": false
}

出力スキーマ

{
  "type": "object",
  "properties": {
    "domain": {
      "type": "string",
      "enum": [
        "data.cdc.gov",
        "chronicdata.cdc.gov"
      ],
      "description": "CDC Socrata host this vocabulary was read from."
    },
    "categories": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "value": {
            "type": "string",
            "description": "The value as the catalog spells it — pass it verbatim to cdc_discover_datasets. Categories are matched case-sensitively by the catalog; tags case-insensitively."
          },
          "datasetCount": {
            "type": "number",
            "description": "Catalog entries carrying this value. Charts, maps, stories, files, and links are counted alongside datasets, so this is an upper bound on the queryable entries a filter returns."
          }
        },
        "required": [
          "value",
          "datasetCount"
        ],
        "additionalProperties": false,
        "description": "One vocabulary value with its catalog entry count."
      },
      "description": "Every domain category matching the filter, ranked by entry count. Pass a value to cdc_discover_datasets' category input exactly as spelled here."
    },
    "tags": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "value": {
            "type": "string",
            "description": "The value as the catalog spells it — pass it verbatim to cdc_discover_datasets. Categories are matched case-sensitively by the catalog; tags case-insensitively."
          },
          "datasetCount": {
            "type": "number",
            "description": "Catalog entries carrying this value. Charts, maps, stories, files, and links are counted alongside datasets, so this is an upper bound on the queryable entries a filter returns."
          }
        },
        "required": [
          "value",
          "datasetCount"
        ],
        "additionalProperties": false,
        "description": "One vocabulary value with its catalog entry count."
      },
      "description": "The requested window of domain tags, ranked by entry count. Pass values to cdc_discover_datasets' tags input; tags union there, so each one added widens the result set."
    },
    "vocabularySize": {
      "type": "object",
      "properties": {
        "categories": {
          "type": "number",
          "description": "Domain categories published for this host."
        },
        "tags": {
          "type": "number",
          "description": "Domain tags published for this host."
        }
      },
      "required": [
        "categories",
        "tags"
      ],
      "additionalProperties": false,
      "description": "Size of each full vocabulary on this host, before any filter was applied."
    },
    "categoryCount": {
      "type": "number",
      "description": "Categories matching the filter. Every one of them is in this response."
    },
    "tagCount": {
      "type": "number",
      "description": "Tags matching the filter, before tag_limit and tag_offset."
    },
    "truncated": {
      "description": "True when the returned tags are a subset of the matching ones. Absent means every matching tag is in this response.",
      "type": "boolean"
    },
    "shown": {
      "description": "Number of tags returned in this response.",
      "type": "number"
    },
    "cap": {
      "description": "The tag_limit that bounded this response.",
      "type": "number"
    },
    "truncationCeiling": {
      "description": "Upper bound on the entry count of every tag not returned. Tags are ranked by entry count, so no omitted tag is carried by more entries than the last one shown.",
      "type": "number"
    },
    "nextOffset": {
      "description": "Value to pass as tag_offset on the next call to continue after the last tag returned. Present only while matching tags remain.",
      "type": "number"
    },
    "notice": {
      "description": "Guidance when the response is a subset of the vocabulary, when a filter too short to discriminate was ignored, when the filter matched nothing, or when tag_offset ran past the end of the matches.",
      "type": "string"
    },
    "error": {
      "description": "Present when the call failed. Absent on success.",
      "type": "object",
      "properties": {
        "code": {
          "type": "integer",
          "minimum": -9007199254740991,
          "maximum": 9007199254740991,
          "description": "JSON-RPC error code for this failure."
        },
        "message": {
          "type": "string",
          "description": "Human-readable description of what went wrong."
        },
        "data": {
          "type": "object",
          "properties": {
            "reason": {
              "type": "string",
              "description": "Machine-readable failure mode. Declared by this tool: `rate_limited`: Socrata API returns 429 Too Many Requests. `dataset_not_found`: Socrata returned 404 for the vocabulary endpoint itself — the Discovery API address is wrong or the service moved. `access_denied`: Socrata returned 403 — the catalog refused this request rather than failing to serve it. `upstream_error`: Socrata catalog API returned a 5xx server error. `invalid_query`: Socrata rejected the vocabulary request with a 400. Other values are possible when a failure originates below the handler.",
              "examples": [
                "rate_limited",
                "dataset_not_found",
                "access_denied",
                "upstream_error",
                "invalid_query"
              ]
            },
            "recovery": {
              "description": "Actionable next step for the caller.",
              "type": "object",
              "properties": {
                "hint": {
                  "type": "string"
                }
              },
              "required": [
                "hint"
              ],
              "additionalProperties": {}
            },
            "retryable": {
              "description": "Whether retrying may succeed.",
              "type": "boolean"
            }
          },
          "additionalProperties": {}
        }
      },
      "required": [
        "code",
        "message"
      ],
      "additionalProperties": {}
    }
  },
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "additionalProperties": false,
  "anyOf": [
    {
      "not": {
        "required": [
          "error"
        ]
      },
      "required": [
        "domain",
        "categories",
        "tags",
        "vocabularySize",
        "categoryCount",
        "tagCount"
      ]
    },
    {
      "required": [
        "error"
      ]
    }
  ]
}
🟢cdc_query_dataset(domain, datasetId, search, select, where, ...)

Execute a SoQL query against any CDC dataset. Supports filtering, aggregation, sorting, full-text search, and field selection. Use cdc_discover_datasets to find dataset IDs and cdc_get_dataset_schema to inspect columns before querying.

入力スキーマ

{
  "type": "object",
  "properties": {
    "domain": {
      "default": "data.cdc.gov",
      "description": "CDC Socrata host to query. \"data.cdc.gov\" (default) and \"chronicdata.cdc.gov\" front the same catalog, so a four-by-four ID returns the same rows from either and the default works whichever host the dataset was found on.",
      "type": "string",
      "enum": [
        "data.cdc.gov",
        "chronicdata.cdc.gov"
      ]
    },
    "datasetId": {
      "type": "string",
      "pattern": "^[a-z0-9]{4}-[a-z0-9]{4}$",
      "description": "Four-by-four dataset identifier (e.g., \"bi63-dtpu\"). Obtain from cdc_discover_datasets."
    },
    "search": {
      "description": "Full-text search across all text columns. For precise filtering use the where parameter instead.",
      "type": "string"
    },
    "select": {
      "description": "SoQL SELECT clause — column names, aliases, or aggregates: \"state, sum(deaths) as total_deaths\". Omit for all columns. To enumerate distinct values of a column, set select to \"{column}, count(*) as count\" with group=\"{column}\" and order=\"count DESC\".",
      "type": "string"
    },
    "where": {
      "description": "SoQL WHERE clause. Strings must be single-quoted: \"state='California' AND year=2020\". If a column name matches a SoQL keyword (group, select, where, order, limit, offset, having, search), wrap it in backticks: \"`group`='By Year'\".",
      "type": "string"
    },
    "group": {
      "description": "SoQL GROUP BY clause. Requires aggregate functions in select.",
      "type": "string"
    },
    "having": {
      "description": "SoQL HAVING clause. Filters aggregated results.",
      "type": "string"
    },
    "order": {
      "description": "SoQL ORDER BY clause. Field name with optional ASC/DESC: \"total_deaths DESC\". Set one whenever paging with offset: SODA does not order results implicitly, so consecutive offsets without a deterministic order can skip or repeat rows. When the dataset has no natural unique column, Socrata's documented minimum tie-breaker is the system field `:id`, present on every dataset — order=\":id\".",
      "type": "string"
    },
    "limit": {
      "default": 100,
      "description": "Max rows to return (default 100, max 5000). Fewer come back when the page would carry the response past its 200,000-character budget, counted over the whole result — the rows as JSON and as the rendered table together; the response says so and gives a nextOffset to resume from.",
      "type": "integer",
      "minimum": 1,
      "maximum": 5000
    },
    "offset": {
      "default": 0,
      "description": "Row offset for pagination (max 1,000,000). Pair with a deterministic order clause — an offset walk over unordered results can skip or repeat rows.",
      "type": "integer",
      "minimum": 0,
      "maximum": 1000000
    }
  },
  "required": [
    "datasetId"
  ],
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "additionalProperties": false
}

出力スキーマ

{
  "type": "object",
  "properties": {
    "rows": {
      "type": "array",
      "items": {
        "type": "object",
        "propertyNames": {
          "type": "string"
        },
        "additionalProperties": {}
      },
      "description": "Result rows with requested fields. Most values are strings (including numbers/dates); geo columns return GeoJSON objects."
    },
    "rowCount": {
      "type": "number",
      "description": "Number of rows returned in this response."
    },
    "effectiveQuery": {
      "type": "string",
      "description": "The SoQL clauses sent to Socrata, as `$clause=value` pairs joined by \"&\". Values read exactly as they were supplied — not URL-encoded — so a clause can be copied back into the matching parameter of another call."
    },
    "truncated": {
      "description": "True when rows exist beyond the ones returned, established by fetching one row more than the limit rather than inferred from the row count. Absent means this response is the complete remainder of the result set.",
      "type": "boolean"
    },
    "shown": {
      "description": "Number of rows returned in this response.",
      "type": "number"
    },
    "cap": {
      "description": "The requested limit that bounded this response.",
      "type": "number"
    },
    "nextOffset": {
      "description": "Offset to pass on the next call to resume immediately after the last row returned. Present only when further rows exist and the resume point is within the offset ceiling; a deterministic order clause is what makes the walk gap-free.",
      "type": "number"
    },
    "notice": {
      "description": "Guidance when no rows matched, when offset ran past the end of the result set, when further rows remain, or when the response budget cut the page short — how to verify filters, lower offset, resume paging, or broaden the query.",
      "type": "string"
    },
    "error": {
      "description": "Present when the call failed. Absent on success.",
      "type": "object",
      "properties": {
        "code": {
          "type": "integer",
          "minimum": -9007199254740991,
          "maximum": 9007199254740991,
          "description": "JSON-RPC error code for this failure."
        },
        "message": {
          "type": "string",
          "description": "Human-readable description of what went wrong."
        },
        "data": {
          "type": "object",
          "properties": {
            "reason": {
              "type": "string",
              "description": "Machine-readable failure mode. Declared by this tool: `dataset_not_found`: Dataset ID does not exist or has been retired. `no_such_column`: WHERE/SELECT/GROUP/ORDER references a column that does not exist on this dataset. `type_mismatch`: Filter value type does not match the column data type (e.g., quoting a number). `invalid_query`: Socrata rejected the SoQL query for other syntax or semantic reasons. `not_queryable`: The ID names a non-tabular asset: the data endpoint answered with rows carrying no fields, and the asset reports no columns. `access_denied`: Socrata returned 403 — typically an ID naming a story, file, or external link rather than a tabular dataset. `rate_limited`: Socrata API returns 429 Too Many Requests. `upstream_error`: Socrata data API returned a 5xx server error. Other values are possible when a failure originates below the handler.",
              "examples": [
                "dataset_not_found",
                "no_such_column",
                "type_mismatch",
                "invalid_query",
                "not_queryable",
                "access_denied",
                "rate_limited",
                "upstream_error"
              ]
            },
            "recovery": {
              "description": "Actionable next step for the caller.",
              "type": "object",
              "properties": {
                "hint": {
                  "type": "string"
                }
              },
              "required": [
                "hint"
              ],
              "additionalProperties": {}
            },
            "retryable": {
              "description": "Whether retrying may succeed.",
              "type": "boolean"
            }
          },
          "additionalProperties": {}
        }
      },
      "required": [
        "code",
        "message"
      ],
      "additionalProperties": {}
    }
  },
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "additionalProperties": false,
  "anyOf": [
    {
      "not": {
        "required": [
          "error"
        ]
      },
      "required": [
        "rows",
        "rowCount",
        "effectiveQuery"
      ]
    },
    {
      "required": [
        "error"
      ]
    }
  ]
}
🟢cdc_query_wonder(database, group_by, cause_icd10, mcd_icd10, sex, ...)

Query CDC WONDER for national US mortality statistics — deaths, population, and crude/age-adjusted death rates — across its five mortality databases, selected with the database input: final underlying-cause data for 1999–2020 (the default) or 2018–2024, provisional data running from 2018 through the current year, and two multiple-cause databases covering the same two eras. Break results out by year, age group, sex, and/or race, and filter by ICD-10 cause of death, sex, age group, or year range; on a multiple-cause database, mcd_icd10 additionally matches a cause listed anywhere on the death certificate rather than only the one certified as underlying. Each database holds a different span of years (1999–2026 across all of them) and a request whose year_range falls outside the selected one's span is rejected with that span named. WONDER is a separate CDC system from the Socrata datasets the other cdc_* tools query. Data is national only — sub-national (state/county) breakdowns are not available through the API (CDC vital-statistics policy). Cause of death is a filter, not a grouping. Some measure cells come back as a CDC status token rather than a number — "Suppressed" (withheld for confidentiality), "Unreliable" (a rate from fewer than 20 deaths), or "Not Applicable" (no population denominator); those cells read null in rows and each one is listed in cellNotes with its token. CDC also drops whole rows before sending the table — strata with zero deaths, and strata whose death count is suppressed — so a stratum can be missing from rows entirely; messages carries CDC's statement whenever that happened. Each response is bounded by a 200,000-character budget counted over the whole result, so a broad grouping — one can run past two thousand rows — comes back a page at a time: the response reports the table's totalCount and a nextOffset to continue from, and limit takes smaller pages. Paging shapes the response only — WONDER is asked once either way, and the figures, caveats and hidden-row notices are the same on every page. CDC rejects requests made less than 15 seconds apart across all five databases, so calls are spaced automatically: calls made while another is running wait their turn and run one after another, each queued call adding about 16 seconds plus its own query time before it returns.

入力スキーマ

{
  "type": "object",
  "properties": {
    "database": {
      "default": "underlying_1999_2020",
      "description": "Which WONDER mortality database to query. \"underlying_1999_2020\" (D76) is final data for 1999–2020 and the default. \"provisional\" (D176) runs 2018 through the current year, updated weekly, and returns the most recent years labelled e.g. \"2025 (provisional)\". \"underlying_2018_2024\" (D158) is settled — not provisional — data for 2018–2024. \"multiple_1999_2020\" (D77) and \"multiple_2018_2024\" (D157) record every cause listed on the death certificate; without an mcd_icd10 filter they return the same figures as the underlying-cause database for the same era, so pick one only to use that filter. The two 1999–2020 databases report race in CDC's four bridged groups; the other three use the six single-race groups — figures broken out by race are not comparable between the two families.",
      "type": "string",
      "enum": [
        "underlying_1999_2020",
        "provisional",
        "underlying_2018_2024",
        "multiple_1999_2020",
        "multiple_2018_2024"
      ]
    },
    "group_by": {
      "default": [
        "year"
      ],
      "description": "Dimensions to break results out by (1–4, each at most once), in output-column order — e.g. [\"year\"], [\"year\",\"sex\"], [\"age_group\",\"race\"]. Results are always national. Cause of death is a filter (cause_icd10), not a grouping. \"race\" resolves to whichever race vocabulary the selected database uses — four bridged groups (Asian and Pacific Islander combined) on the 1999–2020 databases, six single-race categories on the others, one of them \"More than one race\" — so a race series from one family cannot be spliced onto one from the other.",
      "minItems": 1,
      "maxItems": 4,
      "type": "array",
      "items": {
        "type": "string",
        "enum": [
          "year",
          "age_group",
          "sex",
          "race"
        ]
      }
    },
    "cause_icd10": {
      "description": "Filter to ICD-10 underlying causes of death — the single condition CDC certified as having started the chain of events leading to death. Takes one code or range, or a list of them for a cause defined as a code set, e.g. drug overdose as [\"X40\",\"X41\",\"X42\",\"X43\",\"X44\",\"X60\",\"X61\",\"X62\",\"X63\",\"X64\",\"X85\",\"Y10\",\"Y11\",\"Y12\",\"Y13\",\"Y14\"]. Omit for all causes. Accepted by every database. \"999--999\" is not an ICD-10 code but CDC's own marker for deaths whose cause it is still withholding under the provisional database's six-month reporting lag; it counts that backlog, and only the \"provisional\" database offers it.",
      "anyOf": [
        {
          "type": "string",
          "const": ""
        },
        {
          "type": "string",
          "const": "999--999"
        },
        {
          "type": "string",
          "pattern": "^[A-Z][0-9]{2}(\\.[0-9]+)?(-[A-Z][0-9]{2}(\\.[0-9]+)?)?$",
          "description": "ICD-10 underlying-cause code or range. WONDER takes a node of its ICD-10 tree — a chapter such as \"A00-B99\" (infectious) or \"V01-Y89\" (external causes), a block such as \"X40-X49\" (accidental poisoning) or \"C00-C97\" (malignant neoplasms), or a single code such as \"I21\" — and rejects any other span, e.g. \"X40-X44\", naming it in the error. List the codes (or blocks) to cover a span that is not a tree node."
        },
        {
          "minItems": 1,
          "maxItems": 50,
          "type": "array",
          "items": {
            "anyOf": [
              {
                "type": "string",
                "const": "999--999"
              },
              {
                "type": "string",
                "pattern": "^[A-Z][0-9]{2}(\\.[0-9]+)?(-[A-Z][0-9]{2}(\\.[0-9]+)?)?$",
                "description": "ICD-10 underlying-cause code or range. WONDER takes a node of its ICD-10 tree — a chapter such as \"A00-B99\" (infectious) or \"V01-Y89\" (external causes), a block such as \"X40-X49\" (accidental poisoning) or \"C00-C97\" (malignant neoplasms), or a single code such as \"I21\" — and rejects any other span, e.g. \"X40-X44\", naming it in the error. List the codes (or blocks) to cover a span that is not a tree node."
              }
            ],
            "description": "One list entry: an ICD-10 code or range, or the withheld-cause marker."
          },
          "description": "A list of 1–50 entries, each in the single-value form, matched as a union: a death counts once when it matches any of them, so a code set such as X40–X44 plus X60–X64 is one series with one set of rates. Repeated entries are ignored."
        }
      ]
    },
    "mcd_icd10": {
      "description": "Filter to deaths with any of these ICD-10 codes recorded anywhere on the death certificate, whether or not it was the underlying cause — e.g. \"died with a respiratory condition listed\", a population no underlying-cause query can produce. Takes one code or range, or a list of them, e.g. opioid involvement as [\"T40.0\",\"T40.1\",\"T40.2\",\"T40.3\",\"T40.4\",\"T40.6\"]. Valid only when database is \"multiple_1999_2020\", \"multiple_2018_2024\", or \"provisional\"; the other databases record only the underlying cause and reject it. \"999--999\", the withheld-cause marker described under cause_icd10, is offered here too but only by \"provisional\". Combines with cause_icd10, which keeps meaning the underlying cause: a death must match both filters. Omit for all causes.",
      "anyOf": [
        {
          "type": "string",
          "const": ""
        },
        {
          "type": "string",
          "const": "999--999"
        },
        {
          "type": "string",
          "pattern": "^[A-Z][0-9]{2}(\\.[0-9]+)?(-[A-Z][0-9]{2}(\\.[0-9]+)?)?$",
          "description": "ICD-10 code or range, same form as cause_icd10 — a chapter such as \"S00-T98\" (injury and poisoning, a chapter the underlying-cause finder does not list), a block such as \"J09-J18\" (influenza and pneumonia), or a single code such as \"T40.1\" (heroin)."
        },
        {
          "minItems": 1,
          "maxItems": 50,
          "type": "array",
          "items": {
            "anyOf": [
              {
                "type": "string",
                "const": "999--999"
              },
              {
                "type": "string",
                "pattern": "^[A-Z][0-9]{2}(\\.[0-9]+)?(-[A-Z][0-9]{2}(\\.[0-9]+)?)?$",
                "description": "ICD-10 code or range, same form as cause_icd10 — a chapter such as \"S00-T98\" (injury and poisoning, a chapter the underlying-cause finder does not list), a block such as \"J09-J18\" (influenza and pneumonia), or a single code such as \"T40.1\" (heroin)."
              }
            ],
            "description": "One list entry: an ICD-10 code or range, or the withheld-cause marker."
          },
          "description": "A list of 1–50 entries, each in the single-value form, matched as a union: a death counts once when it matches any of them, so a code set such as X40–X44 plus X60–X64 is one series with one set of rates. Repeated entries are ignored."
        }
      ]
    },
    "sex": {
      "default": "all",
      "description": "Filter by sex.",
      "type": "string",
      "enum": [
        "all",
        "male",
        "female"
      ]
    },
    "age_groups": {
      "description": "Restrict to deaths in any of the listed age groups — e.g. [\"25-34\",\"35-44\"] covers both; a repeated group counts once. \"1\" is the under-1-year group. \"NS\" is the group CDC puts a death in when the age was not recorded; it is not covered by any of the ten-year groups, so a filter listing all eleven of those still leaves those deaths out and returns fewer deaths than the same query unfiltered. List \"NS\" alongside them to match an unfiltered total, or on its own to count them. Omit for all ages, which includes them.",
      "type": "array",
      "items": {
        "type": "string",
        "enum": [
          "1",
          "1-4",
          "5-14",
          "15-24",
          "25-34",
          "35-44",
          "45-54",
          "55-64",
          "65-74",
          "75-84",
          "85+",
          "NS"
        ]
      }
    },
    "year_range": {
      "description": "Inclusive year range; from must not be later than to. These bounds span every database (1999–2026); the years the selected one actually holds are narrower, and a range outside them is rejected with that database's span named. Omit for all years the database holds.",
      "type": "object",
      "properties": {
        "from": {
          "type": "integer",
          "minimum": 1999,
          "maximum": 2026,
          "description": "First year (1999–2026 across all databases; the selected one holds a narrower span)."
        },
        "to": {
          "type": "integer",
          "minimum": 1999,
          "maximum": 2026,
          "description": "Last year (1999–2026 across all databases; the selected one holds a narrower span)."
        }
      },
      "required": [
        "from",
        "to"
      ]
    },
    "limit": {
      "description": "Rows to return from the table CDC sent (1–5000). Omit to take as many as fit. Either way fewer come back when the page would carry the response past its 200,000-character budget, counted over the whole result — the rows, their cell notes, and the caveats and messages, as JSON and as the rendered table together; the response says so and gives a nextOffset to resume from. WONDER's request carries no limit of its own, so this pages a table already fetched in full rather than narrowing the query: the deaths, rates, caveats and hidden-row notices are the same whichever page is read.",
      "type": "integer",
      "minimum": 1,
      "maximum": 5000
    },
    "offset": {
      "default": 0,
      "description": "Index of the first row to return, for continuing past a previous call (default 0, max 10,000). Rows keep the order CDC returned them in, which is stable for a given query, so offset plus limit walks the table without gaps or repeats. An offset at or past the row total returns an empty page rather than an error.",
      "type": "integer",
      "minimum": 0,
      "maximum": 10000
    }
  },
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "additionalProperties": false
}

出力スキーマ

{
  "type": "object",
  "properties": {
    "rows": {
      "type": "array",
      "items": {
        "type": "object",
        "propertyNames": {
          "type": "string"
        },
        "additionalProperties": {
          "type": [
            "string",
            "number",
            "null"
          ]
        }
      },
      "description": "Result rows. Each carries the requested group-by dimensions plus deaths, population, crude_rate, and age_adjusted_rate (per 100,000) when age standardization is possible — it is omitted when age_group is a grouping dimension or age_groups selects a single group. Dimension values are CDC's own labels with only surrounding whitespace removed, so the same year keys identically across databases; nothing inside a label is changed, and on the provisional database a year reads \"2025 (provisional)\" or \"2026 (provisional and partial)\" rather than a bare year. A measure cell CDC returned as a status token instead of a number is null here; cellNotes names the cell and the token. These are one page of the table CDC sent, in its order, bounded by limit and by the response budget; totalCount says how many rows the whole table holds."
    },
    "rowCount": {
      "type": "number",
      "description": "Number of rows returned in this response — the page size whenever it falls short of totalCount."
    },
    "database": {
      "type": "string",
      "description": "WONDER dataset code the rows came from — e.g. \"D76\", \"D176\", \"D157\"."
    },
    "databaseTitle": {
      "type": "string",
      "description": "CDC's own title for that database, e.g. \"Underlying Cause of Death, 1999-2020\". Names the era and record type the rows describe, so a result read on its own is self-describing."
    },
    "caveats": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "CDC-provided caveats and footnotes: data revisions, population-estimate sources, suppression and rate-reliability rules. CDC's links to its methodology pages are kept as Markdown links, e.g. \"[More information.](https://wonder.cdc.gov/wonder/help/ucd-expanded.html#Confidence-Intervals)\". They describe the whole table CDC assembled, so they come back complete on every page rather than scoped to the rows returned."
    },
    "cellNotes": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "row": {
            "type": "number",
            "description": "Zero-based index into rows — the rows in this response, so it is relative to the page rather than to the whole table."
          },
          "column": {
            "type": "string",
            "description": "Measure column whose numeric value the token replaced."
          },
          "token": {
            "type": "string",
            "description": "Token CDC returned in place of a number: \"Suppressed\" (withheld for confidentiality, fewer than 10 persons), \"Unreliable\" (rate from fewer than 20 deaths — published, not withheld), or \"Not Applicable\" (no population denominator)."
          }
        },
        "required": [
          "row",
          "column",
          "token"
        ],
        "additionalProperties": false,
        "description": "One flagged measure cell: where it is and what CDC put there."
      },
      "description": "One entry per measure cell CDC returned as a status token rather than a number, covering the rows in this response only. Those cells read null in rows, so this is what tells a withheld value apart from an unreliable one or a genuinely absent one."
    },
    "messages": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Notices CDC attached to this table, verbatim apart from links, which are kept as Markdown links. The ones that matter say rows were withheld before the table was sent — \"Rows with zero Deaths are hidden.\" and \"Rows with suppressed Deaths are hidden.\" A withheld row is absent from rows entirely, with nothing in the table marking the gap, so while this array is non-empty a stratum missing from rows may have been dropped rather than unobserved, and any count, ranking, or completeness claim drawn from rows is partial. These describe the whole table, so they come back complete on every page. Empty when CDC withheld no rows."
    },
    "suppressedCount": {
      "type": "number",
      "description": "How many cellNotes carry the \"Suppressed\" token — cells CDC withheld for confidentiality. Counted over the rows in this response, so it tracks the page rather than the whole table."
    },
    "effectiveQuery": {
      "type": "string",
      "description": "Human-readable summary of the grouping and filters sent to WONDER."
    },
    "totalCount": {
      "type": "number",
      "description": "Rows in the whole table CDC returned, before any page was taken. Exact rather than estimated — the table is parsed in full before a page is taken from it."
    },
    "truncated": {
      "description": "True when rows remain past the ones returned. Absent means this response runs to the end of the table, which is also the case for an offset past it.",
      "type": "boolean"
    },
    "shown": {
      "description": "Number of rows returned in this response.",
      "type": "number"
    },
    "cap": {
      "description": "Rows this call asked for — limit when set, otherwise every row from offset to the end of the table. A shown below it means the response budget cut the page short.",
      "type": "number"
    },
    "nextOffset": {
      "description": "Offset to pass on the next call to resume immediately after the last row returned. Present only when further rows remain.",
      "type": "number"
    },
    "notice": {
      "description": "Guidance when no rows matched, when the returned rows are a page of a larger table — naming whether limit or the response budget ended it — or the offset ran past it, and a note when CDC returned a status token in place of a measure value.",
      "type": "string"
    },
    "error": {
      "description": "Present when the call failed. Absent on success.",
      "type": "object",
      "properties": {
        "code": {
          "type": "integer",
          "minimum": -9007199254740991,
          "maximum": 9007199254740991,
          "description": "JSON-RPC error code for this failure."
        },
        "message": {
          "type": "string",
          "description": "Human-readable description of what went wrong."
        },
        "data": {
          "type": "object",
          "properties": {
            "reason": {
              "type": "string",
              "description": "Machine-readable failure mode. Declared by this tool: `invalid_query`: The request contradicts itself — a year_range whose from is later than its to, or a group_by dimension listed twice — or does not fit the selected database — a year_range outside the years it holds, mcd_icd10 against a database that records only the underlying cause, or the withheld-cause marker against one that keeps no withheld backlog — or WONDER itself rejected it, e.g. an ICD-10 code or range its tree does not hold, or a filter/grouping combination it does not allow. `rate_limited`: A request reached WONDER less than 15 seconds after the previous response to the same source IP finished, and WONDER returned 429. This server queues its own calls, so the earlier request usually came from another client sharing that IP. `upstream_error`: WONDER returned an unexpected response or was unreachable. Other values are possible when a failure originates below the handler.",
              "examples": [
                "invalid_query",
                "rate_limited",
                "upstream_error"
              ]
            },
            "recovery": {
              "description": "Actionable next step for the caller.",
              "type": "object",
              "properties": {
                "hint": {
                  "type": "string"
                }
              },
              "required": [
                "hint"
              ],
              "additionalProperties": {}
            },
            "retryable": {
              "description": "Whether retrying may succeed.",
              "type": "boolean"
            }
          },
          "additionalProperties": {}
        }
      },
      "required": [
        "code",
        "message"
      ],
      "additionalProperties": {}
    }
  },
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "additionalProperties": false,
  "anyOf": [
    {
      "not": {
        "required": [
          "error"
        ]
      },
      "required": [
        "rows",
        "rowCount",
        "database",
        "databaseTitle",
        "caveats",
        "cellNotes",
        "messages",
        "suppressedCount",
        "effectiveQuery",
        "totalCount"
      ]
    },
    {
      "required": [
        "error"
      ]
    }
  ]
}

コミュニティ

このサーバーを評価する

エビデンス

最近の観測

検証済みバージョンは記録されていませんツール 5 件
検証済みバージョンは記録されていませんツール 5 件
検証済みバージョンは記録されていませんツール 4 件