/** * @fileoverview Barrel export for all census-mcp-server tool definitions. * @module mcp-server/tools/definitions/index */ import { censusCompareGeographies } from './census-compare-geographies.tool.js'; import { censusGetVariable } from './census-get-variable.tool.js'; import { censusListDatasets } from './census-list-datasets.tool.js'; import { censusListGeographies } from './census-list-geographies.tool.js'; import { censusListPredicateValues } from './census-list-predicate-values.tool.js'; import { censusQueryData } from './census-query-data.tool.js'; import { censusResolveGeography } from './census-resolve-geography.tool.js'; import { censusSearchVariables } from './census-search-variables.tool.js'; export { censusCompareGeographies, censusGetVariable, censusListDatasets, censusListGeographies, censusListPredicateValues, censusQueryData, censusResolveGeography, censusSearchVariables, }; export declare const allToolDefinitions: (import("@cyanheads/mcp-ts-core").ToolDefinition; }, import("zod/v4/core").$strip>, import("zod/v4").ZodObject<{ datasets: import("zod/v4").ZodArray; }, import("zod/v4/core").$strip>>; }, import("zod/v4/core").$strip>, undefined, { readonly totalCount: import("zod/v4").ZodNumber; readonly filterApplied: import("zod/v4").ZodOptional; readonly notice: import("zod/v4").ZodOptional; }> | import("@cyanheads/mcp-ts-core").ToolDefinition; }, import("zod/v4/core").$strip>, import("zod/v4").ZodObject<{ geography_levels: import("zod/v4").ZodArray; example: import("zod/v4").ZodString; }, import("zod/v4/core").$strip>>; }, import("zod/v4/core").$strip>, readonly [{ readonly reason: "dataset_not_found"; readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.NotFound; readonly when: "Dataset code is not recognized."; readonly recovery: "Call census_list_datasets to discover valid dataset codes like acs/acs5."; }, { readonly reason: "year_not_available"; readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.ValidationError; readonly when: "Dataset exists but the requested year has no data."; readonly recovery: "Check available_years in census_list_datasets for valid years for this dataset."; }], { readonly dataset: import("zod/v4").ZodString; readonly year: import("zod/v4").ZodNumber; readonly totalLevels: import("zod/v4").ZodNumber; }> | import("@cyanheads/mcp-ts-core").ToolDefinition; year: import("zod/v4").ZodOptional; limit: import("zod/v4").ZodOptional; }, import("zod/v4/core").$strip>, import("zod/v4").ZodObject<{ variables: import("zod/v4").ZodArray; moe_code: import("zod/v4").ZodOptional; }, import("zod/v4/core").$strip>>; }, import("zod/v4/core").$strip>, readonly [{ readonly reason: "dataset_not_found"; readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.NotFound; readonly when: "Dataset code is not recognized."; readonly thrownBy: "service"; readonly recovery: "Call census_list_datasets to discover valid dataset codes like acs/acs5."; }, { readonly reason: "year_not_available"; readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.ValidationError; readonly when: "The dataset does not serve the requested vintage year."; readonly thrownBy: "service"; readonly recovery: "Retry with a year from available_years in census_list_datasets; the error names the years this dataset serves."; }, { readonly reason: "variables_unavailable"; readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.ServiceUnavailable; readonly when: "Variable metadata could not be fetched or parsed from the Census API."; readonly retryable: true; readonly thrownBy: "service"; readonly recovery: "Retry the request; if persistent, the dataset and year combination may not be available."; }], { readonly effectiveQuery: import("zod/v4").ZodString; readonly dataset: import("zod/v4").ZodString; readonly year: import("zod/v4").ZodNumber; readonly totalMatches: import("zod/v4").ZodNumber; readonly truncated: import("zod/v4").ZodOptional; readonly shown: import("zod/v4").ZodOptional; readonly cap: import("zod/v4").ZodOptional; readonly notice: import("zod/v4").ZodOptional; }> | import("@cyanheads/mcp-ts-core").ToolDefinition; dataset: import("zod/v4").ZodOptional; year: import("zod/v4").ZodOptional; }, import("zod/v4/core").$strip>, import("zod/v4").ZodObject<{ variables: import("zod/v4").ZodArray; estimate_code: import("zod/v4").ZodOptional; moe_code: import("zod/v4").ZodOptional; }, import("zod/v4/core").$strip>>; dataset: import("zod/v4").ZodString; year: import("zod/v4").ZodNumber; }, import("zod/v4/core").$strip>, readonly [{ readonly reason: "variable_not_found"; readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.NotFound; readonly when: "One or more variable codes were not found in the dataset and year."; readonly thrownBy: "service"; readonly recovery: "Use census_search_variables to discover valid variable codes for this dataset and year."; }, { readonly reason: "dataset_not_found"; readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.NotFound; readonly when: "Dataset code is not recognized."; readonly thrownBy: "service"; readonly recovery: "Call census_list_datasets to discover valid dataset codes like acs/acs5."; }, { readonly reason: "year_not_available"; readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.ValidationError; readonly when: "The dataset does not serve the requested vintage year."; readonly thrownBy: "service"; readonly recovery: "Retry with a year from available_years in census_list_datasets; the error names the years this dataset serves."; }, { readonly reason: "variables_unavailable"; readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.ServiceUnavailable; readonly when: "Variable metadata endpoint is unreachable or returned an unparseable response."; readonly retryable: true; readonly thrownBy: "service"; readonly recovery: "Retry the request; if persistent, the dataset and year combination may not be available."; }], undefined> | import("@cyanheads/mcp-ts-core").ToolDefinition; query: import("zod/v4").ZodOptional; within_naics: import("zod/v4").ZodOptional, import("zod/v4").ZodString]>>; limit: import("zod/v4").ZodOptional; }, import("zod/v4/core").$strip>, import("zod/v4").ZodObject<{ values: import("zod/v4").ZodArray>; predicate: import("zod/v4").ZodString; predicate_label: import("zod/v4").ZodString; dataset: import("zod/v4").ZodString; year: import("zod/v4").ZodNumber; }, import("zod/v4/core").$strip>, readonly [{ readonly reason: "dataset_not_found"; readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.NotFound; readonly when: "Dataset code is not recognized."; readonly recovery: "Call census_list_datasets to discover valid dataset codes like cbp or nonemp."; }, { readonly reason: "year_not_available"; readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.ValidationError; readonly when: "The dataset does not serve the requested vintage year."; readonly thrownBy: "service"; readonly recovery: "Retry with a year from available_years in census_list_datasets; the error names the years this dataset serves."; }, { readonly reason: "predicate_not_supported"; readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.NotFound; readonly when: "The predicate code is not a variable in this dataset and year."; readonly recovery: "Call census_search_variables on this dataset and year for the codes it does define — dimension names are vintage-specific, so NAICS2017 and NAICS2022 belong to different years."; }, { readonly reason: "not_a_filter_dimension"; readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.ValidationError; readonly when: "The code is not one of the dimensions the dataset filters on, so it takes no value list."; readonly recovery: "Pass a dimension the dataset filters on. The response notice of census_query_data names every dimension a dataset declares, and census_get_variable confirms what a code is."; }, { readonly reason: "no_values"; readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.NotFound; readonly when: "The dimension returned no codes for the scope requested."; readonly recovery: "Drop within_naics, or try a broader industry code — a narrow leaf industry often publishes only the all-establishments row."; }, { readonly reason: "upstream_error"; readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.ServiceUnavailable; readonly when: "Census API returned an error or was unreachable."; readonly retryable: true; readonly thrownBy: "service"; readonly recovery: "Retry the request; if the error persists, the Census API may be temporarily unavailable."; }], { readonly totalCount: import("zod/v4").ZodNumber; readonly truncated: import("zod/v4").ZodBoolean; readonly source: import("zod/v4").ZodString; readonly notice: import("zod/v4").ZodOptional; }> | import("@cyanheads/mcp-ts-core").ToolDefinition>; county_fips: import("zod/v4").ZodOptional; }, import("zod/v4/core").$strip>, import("zod/v4").ZodObject<{ name: import("zod/v4").ZodString; geography_type: import("zod/v4").ZodString; state_fips: import("zod/v4").ZodOptional; county_fips: import("zod/v4").ZodOptional; tract_fips: import("zod/v4").ZodOptional; place_fips: import("zod/v4").ZodOptional; fips_summary: import("zod/v4").ZodString; }, import("zod/v4/core").$strip>, readonly [{ readonly reason: "no_match"; readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.NotFound; readonly when: "Place name not recognized at any geography level tried for it."; readonly thrownBy: "service"; readonly recovery: "Check the spelling, set geography_type to search a different level, or pass a full street address."; }, { readonly reason: "ambiguous_name"; readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.ValidationError; readonly when: "Name matched more than one geography."; readonly thrownBy: "service"; readonly recovery: "Take fips_summary from the candidate you want in the error, or re-call with the candidate name — tract candidates need county_fips instead, since they share a name."; }, { readonly reason: "county_scope_unsupported"; readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.ValidationError; readonly when: "county_fips was combined with a street address, or with a geography_type — set or auto-detected — that does not sit within a county."; readonly thrownBy: "service"; readonly recovery: "Drop county_fips, or set geography_type to \"county\" or \"tract\" to use it."; }, { readonly reason: "resolution_unavailable"; readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.ServiceUnavailable; readonly when: "Geography resolution endpoint was unreachable."; readonly retryable: true; readonly thrownBy: "service"; readonly recovery: "Retry the request — the Census geography endpoints are free-tier with no auth requirements."; }], undefined> | import("@cyanheads/mcp-ts-core").ToolDefinition; geography_level: import("zod/v4").ZodString; geography_fips: import("zod/v4").ZodString; parent_fips: import("zod/v4").ZodOptional, import("zod/v4").ZodString]>>; county_fips: import("zod/v4").ZodOptional, import("zod/v4").ZodString]>>; predicates: import("zod/v4").ZodOptional>; dataset: import("zod/v4").ZodOptional; year: import("zod/v4").ZodOptional; }, import("zod/v4/core").$strip>, import("zod/v4").ZodObject<{ rows: import("zod/v4").ZodArray; applied_filters: import("zod/v4").ZodOptional>; record: import("zod/v4").ZodOptional>; }, import("zod/v4/core").$strip>>; }, import("zod/v4/core").$strip>, readonly [{ readonly reason: "dataset_not_found"; readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.NotFound; readonly when: "Dataset code is not recognized."; readonly recovery: "Call census_list_datasets to discover valid dataset codes like acs/acs5."; }, { readonly reason: "missing_api_key"; readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.Unauthorized; readonly when: "CENSUS_API_KEY is not configured or the key is invalid."; readonly thrownBy: "service"; readonly recovery: "Set the CENSUS_API_KEY environment variable and restart the server. Register a free key at api.census.gov/data/key_signup.html."; }, { readonly reason: "year_not_available"; readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.ValidationError; readonly when: "The dataset does not serve the requested vintage year."; readonly thrownBy: "service"; readonly recovery: "Retry with a year from available_years in census_list_datasets; the error names the years this dataset serves."; }, { readonly reason: "variable_not_found"; readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.NotFound; readonly when: "One or more variable codes do not exist in the requested dataset and year."; readonly thrownBy: "service"; readonly recovery: "Call census_search_variables or census_get_variable to confirm codes for this dataset and year."; }, { readonly reason: "variables_unavailable"; readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.ServiceUnavailable; readonly when: "The variable metadata endpoint returned an unparseable response for this dataset and year."; readonly retryable: true; readonly thrownBy: "service"; readonly recovery: "Retry the request; if it persists, the Census metadata endpoint is temporarily unavailable."; }, { readonly reason: "geography_not_supported"; readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.ValidationError; readonly when: "The requested geography level does not exist in this dataset and year."; readonly recovery: "Call census_list_geographies to see supported geography levels for this dataset."; }, { readonly reason: "parent_required"; readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.ValidationError; readonly when: "The geography level requires a parent FIPS code but parent_fips was not provided, or a tract/block-group level requires county_fips but it was omitted."; readonly recovery: "Add parent_fips (state FIPS) from census_resolve_geography state_fips. For tract or block-group levels also add county_fips from census_resolve_geography county_fips."; }, { readonly reason: "parent_not_accepted"; readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.ValidationError; readonly when: "parent_fips or county_fips names a parent the geography level does not sit within."; readonly recovery: "Drop the parent this level does not name. Levels such as zip code tabulation area, urban area, and metropolitan statistical area/micropolitan statistical area are queried with no parent at all; census_list_geographies shows the parents each level takes."; }, { readonly reason: "no_data"; readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.NotFound; readonly when: "The query returned no rows."; readonly recovery: "Confirm the FIPS codes exist for this dataset and year — census_resolve_geography returns them for a place name, and census_list_geographies confirms the level is supported."; }, { readonly reason: "too_many_variables"; readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.ValidationError; readonly when: "More than 50 variable codes were requested."; readonly recovery: "Split the request into multiple calls with at most 50 variables each."; }, { readonly reason: "predicate_not_supported"; readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.ValidationError; readonly when: "A key in predicates is not a variable in this dataset and year."; readonly recovery: "Remove the unrecognized key. Call census_search_variables on this dataset and year for the codes it does define — predicate names are vintage-specific, so NAICS2017 and NAICS2022 belong to different years."; }, { readonly reason: "upstream_error"; readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.ServiceUnavailable; readonly when: "Census API returned an error or was unreachable."; readonly retryable: true; readonly thrownBy: "service"; readonly recovery: "Retry the request; if the error persists, the Census API may be temporarily unavailable."; }], { readonly totalRows: import("zod/v4").ZodNumber; readonly dataset: import("zod/v4").ZodString; readonly year: import("zod/v4").ZodNumber; readonly notice: import("zod/v4").ZodOptional; }> | import("@cyanheads/mcp-ts-core").ToolDefinition; geography_level: import("zod/v4").ZodString; within: import("zod/v4").ZodOptional, import("zod/v4").ZodString]>>; within_county: import("zod/v4").ZodOptional, import("zod/v4").ZodString]>>; geographies: import("zod/v4").ZodOptional>; predicates: import("zod/v4").ZodOptional>; dataset: import("zod/v4").ZodOptional; year: import("zod/v4").ZodOptional; sort_by: import("zod/v4").ZodOptional; sort_dir: import("zod/v4").ZodOptional>; limit: import("zod/v4").ZodOptional; }, import("zod/v4/core").$strip>, import("zod/v4").ZodObject<{ rows: import("zod/v4").ZodArray; applied_filters: import("zod/v4").ZodOptional>; record: import("zod/v4").ZodOptional>; rank: import("zod/v4").ZodNumber; }, import("zod/v4/core").$strip>>; }, import("zod/v4/core").$strip>, readonly [{ readonly reason: "dataset_not_found"; readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.NotFound; readonly when: "Dataset code is not recognized."; readonly recovery: "Call census_list_datasets to discover valid dataset codes like acs/acs5."; }, { readonly reason: "missing_api_key"; readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.Unauthorized; readonly when: "CENSUS_API_KEY is not configured or the key is invalid."; readonly thrownBy: "service"; readonly recovery: "Set the CENSUS_API_KEY environment variable and restart the server. Register a free key at api.census.gov/data/key_signup.html."; }, { readonly reason: "geography_not_supported"; readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.ValidationError; readonly when: "The requested geography level does not exist in this dataset and year."; readonly recovery: "Call census_list_geographies to see supported geography levels for this dataset and year."; }, { readonly reason: "parent_required"; readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.ValidationError; readonly when: "The geography level requires a parent FIPS but within, or within_county, was not provided."; readonly recovery: "Add the within parameter with the state FIPS from census_resolve_geography state_fips. For tract or block-group levels also add within_county from census_resolve_geography county_fips."; }, { readonly reason: "parent_not_accepted"; readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.ValidationError; readonly when: "within or within_county names a parent the geography level does not sit within."; readonly recovery: "Drop the parent this level does not name. Levels such as urban area, zip code tabulation area, and metropolitan statistical area/micropolitan statistical area are compared nationally with no scope at all; census_list_geographies shows the parents each level takes."; }, { readonly reason: "year_not_available"; readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.ValidationError; readonly when: "The dataset does not serve the requested vintage year."; readonly thrownBy: "service"; readonly recovery: "Retry with a year from available_years in census_list_datasets; the error names the years this dataset serves."; }, { readonly reason: "variable_not_found"; readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.NotFound; readonly when: "One or more variable codes are not found in this dataset and year."; readonly thrownBy: "service"; readonly recovery: "Use census_search_variables or census_get_variable to confirm codes for this dataset and year."; }, { readonly reason: "variables_unavailable"; readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.ServiceUnavailable; readonly when: "The variable metadata endpoint returned an unparseable response for this dataset and year."; readonly retryable: true; readonly thrownBy: "service"; readonly recovery: "Retry the request; if it persists, the Census metadata endpoint is temporarily unavailable."; }, { readonly reason: "predicate_not_supported"; readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.ValidationError; readonly when: "A key in predicates is not a variable in this dataset and year."; readonly recovery: "Remove the unrecognized key. Call census_search_variables on this dataset and year for the codes it does define — predicate names are vintage-specific, so NAICS2017 and NAICS2022 belong to different years."; }, { readonly reason: "ambiguous_rows"; readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.ValidationError; readonly when: "The dataset publishes several records per geography and the comparison pinned none of them, so every geography would occupy several ranks with different values."; readonly recovery: "Add the record column named in the error to predicates to pin one record — on pep/charv that is MONTH, where \"7\" selects the July estimate and \"4\" the April estimates base. census_query_data returns every record for a single geography if you need to see them first."; }, { readonly reason: "no_data"; readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.NotFound; readonly when: "No geographies were returned for the query, or no row matched any entry in the geographies list."; readonly recovery: "Confirm the level is populated for this dataset and year with census_list_geographies, and that any geographies entries are valid FIPS codes from census_resolve_geography."; }, { readonly reason: "upstream_error"; readonly code: import("@cyanheads/mcp-ts-core/errors").JsonRpcErrorCode.ServiceUnavailable; readonly when: "Census API was unreachable or returned an error."; readonly retryable: true; readonly thrownBy: "service"; readonly recovery: "Retry the request; if the error persists, the Census API may be temporarily unavailable."; }], { readonly totalCount: import("zod/v4").ZodNumber; readonly truncated: import("zod/v4").ZodBoolean; readonly sortVariable: import("zod/v4").ZodString; readonly dataset: import("zod/v4").ZodString; readonly year: import("zod/v4").ZodNumber; readonly notice: import("zod/v4").ZodOptional; }>)[]; //# sourceMappingURL=index.d.ts.map