/** * @fileoverview Query World Bank indicator values for countries across a time range. * The primary data-access tool. * @module mcp-server/tools/definitions/worldbank-get-data.tool */ import { z } from '@cyanheads/mcp-ts-core'; import { JsonRpcErrorCode } from '@cyanheads/mcp-ts-core/errors'; export declare const worldbankGetData: import("@cyanheads/mcp-ts-core").ToolDefinition]>; date_range: z.ZodOptional; mrv: z.ZodOptional; mrnev: z.ZodOptional; frequency: z.ZodOptional, z.ZodEnum<{ annual: "annual"; monthly: "monthly"; quarterly: "quarterly"; }>]>>; dimension_value: z.ZodOptional; page: z.ZodDefault; per_page: z.ZodOptional; }, z.core.$strip>, z.ZodObject<{ data: z.ZodArray; obsStatus: z.ZodString; isAggregate: z.ZodBoolean; dimension: z.ZodOptional>; }, z.core.$strip>>; sourceScoped: z.ZodOptional; id: z.ZodNullable; label: z.ZodNullable; }, z.core.$strip>>; note: z.ZodString; }, z.core.$strip>>; indicator: z.ZodObject<{ id: z.ZodString; name: z.ZodString; }, z.core.$strip>; nullCount: z.ZodNumber; }, z.core.$strip>, readonly [{ readonly reason: "invalid_params"; readonly code: JsonRpcErrorCode.ValidationError; readonly when: "More than one of date_range, mrv, and mrnev is provided, or frequency is provided with date_range."; readonly recovery: "Keep one of date_range, mrv, or mrnev and remove the others: date_range for a time window, mrv for the latest periods across the countries, mrnev for each country's own latest values. Drop frequency when date_range is set: the window's own period form (2024, 2024Q1:2024Q4, 2024M01:2024M12) already picks the periods."; }, { readonly reason: "mixed_all_selector"; readonly code: JsonRpcErrorCode.ValidationError; readonly when: "countries combines \"all\" with one or more country codes."; readonly recovery: "Pass \"all\" on its own for every entry, or drop it and list only the country codes."; }, { readonly reason: "reversed_date_range"; readonly code: JsonRpcErrorCode.ValidationError; readonly when: "date_range names a range whose first period comes after its second."; readonly recovery: "Swap the two periods so date_range runs earliest period first, e.g. 2010:2020 rather than 2020:2010."; }, { readonly reason: "multiple_indicators"; readonly code: JsonRpcErrorCode.ValidationError; readonly when: "The indicator ID is \"all\", which selects every indicator rather than one."; readonly recovery: "Pass a single indicator ID; use worldbank_search_indicators to find the indicator to query."; }, { readonly reason: "indicator_not_found"; readonly code: JsonRpcErrorCode.NotFound; readonly when: "The indicator ID does not exist."; readonly recovery: "Use worldbank_search_indicators to find valid indicator IDs by keyword or topic."; }, { readonly reason: "indicator_not_queryable"; readonly code: JsonRpcErrorCode.NotFound; readonly when: "The standard data endpoint does not serve the indicator, and no catalog source can serve it through the source-scoped data API instead — the catalog no longer lists the ID, the catalog lookup failed, or the source is not organized by country, series, and time plus at most one further dimension."; readonly recovery: "Changing the countries, dates, or dimension_value will not help. Use worldbank_search_indicators to find another indicator for the same measure."; }, { readonly reason: "unknown_dimension_value"; readonly code: JsonRpcErrorCode.ValidationError; readonly when: "dimension_value is not a value the indicator's dataset lists for its extra dimension."; readonly recovery: "Pass one of the dimension ids the error message lists for this indicator, or omit dimension_value to use the default the response reports."; }, { readonly reason: "dimension_not_applicable"; readonly code: JsonRpcErrorCode.ValidationError; readonly when: "dimension_value is given for an indicator the standard data endpoint serves, or whose dataset has no dimension beyond country, series, and time."; readonly recovery: "Remove dimension_value; this indicator has no extra dimension to select."; }, { readonly reason: "source_scope_too_large"; readonly code: JsonRpcErrorCode.ValidationError; readonly when: "A source-scoped query would read more rows (countries × periods × unpinned dimension values) than one request allows."; readonly recovery: "Narrow countries or date_range, or pin dimension_value; a narrower call reports the default value it applied in sourceScoped.dimension, which can then be pinned."; }, { readonly reason: "country_not_found"; readonly code: JsonRpcErrorCode.NotFound; readonly when: "One or more country codes are invalid. The message and countryCodes name the codes the World Bank country listing lacks, or every requested code when it lacks none."; readonly recovery: "Use worldbank_list_countries to browse valid ISO2, ISO3, and aggregate codes."; }, { readonly reason: "indicator_and_country_not_found"; readonly code: JsonRpcErrorCode.NotFound; readonly when: "The indicator ID and the country codes are both invalid. The codes are named as on country_not_found."; readonly recovery: "Look the indicator up with worldbank_search_indicators and the codes with worldbank_list_countries before retrying."; }, { readonly reason: "upstream_inconsistent"; readonly code: JsonRpcErrorCode.ServiceUnavailable; readonly when: "The World Bank API answered a data read, and its one re-read, with rows that do not fit the request — its response cache served another query's result — so nothing was served."; readonly recovery: "Retry later, or change the countries list, which sends a request the stale cached answer does not match."; readonly retryable: true; }], { readonly appliedFilters: z.ZodObject<{ indicatorId: z.ZodString; countries: z.ZodString; dateRange: z.ZodOptional; mrv: z.ZodOptional; mrnev: z.ZodOptional; frequency: z.ZodOptional>; dimensionValue: z.ZodOptional; page: z.ZodNumber; perPage: z.ZodNumber; requestedPerPage: z.ZodOptional; }, z.core.$strip>; readonly totalCount: z.ZodNumber; readonly currentPage: z.ZodNumber; readonly totalPages: z.ZodNumber; readonly lastUpdated: z.ZodOptional; readonly notice: z.ZodOptional; }>; //# sourceMappingURL=worldbank-get-data.tool.d.ts.map