/** * @fileoverview Tool to list the codes a Census filter dimension accepts, from the dataset's * published value map when it has one and from a wildcard group-by query when it does not. * A published value map is a classification, not a record of what the dataset serves, so the * codes read from one are checked against the dataset's own published rows before being returned. * @module mcp-server/tools/definitions/census-list-predicate-values */ import { z } from '@cyanheads/mcp-ts-core'; import { JsonRpcErrorCode } from '@cyanheads/mcp-ts-core/errors'; export declare const censusListPredicateValues: import("@cyanheads/mcp-ts-core").ToolDefinition; query: z.ZodOptional; within_naics: z.ZodOptional, z.ZodString]>>; limit: z.ZodOptional; }, z.core.$strip>, z.ZodObject<{ values: z.ZodArray>; predicate: z.ZodString; predicate_label: z.ZodString; dataset: z.ZodString; year: z.ZodNumber; }, z.core.$strip>, readonly [{ readonly reason: "dataset_not_found"; readonly code: 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: 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: 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: 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: 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: 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: z.ZodNumber; readonly truncated: z.ZodBoolean; readonly source: z.ZodString; readonly notice: z.ZodOptional; }>; //# sourceMappingURL=census-list-predicate-values.tool.d.ts.map